Skip to content
This repository was archived by the owner on Oct 30, 2024. It is now read-only.

Commit ddaf408

Browse files
author
Raül Pérez
committed
Merge branch 'feature/13' into develop
2 parents d444985 + c564317 commit ddaf408

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

examples/pubsub/sub.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
const HOST = "localhost";
55
const PORT = 4222;
66

7-
$c = new Nats\Connection(HOST, PORT);
7+
$c = new Nats\Connection();
88
$c->connect();
99

1010
$callback = function ($payload) {
@@ -13,4 +13,6 @@
1313

1414
$sid = $c->subscribe("foo", $callback);
1515

16-
$c->wait();
16+
$c->wait(2);
17+
18+
$c->unsubscribe($sid);

0 commit comments

Comments
 (0)