Skip to content

Commit ad631fc

Browse files
committed
Start the connection sooner, fixes bergie#9
1 parent 4db35b4 commit ad631fc

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"description": "DNode RPC protocol for PHP 5.3",
55
"keywords": ["dnode", "nodejs", "rpc"],
66
"homepage": "https://github.com/bergie/dnode-php",
7-
"version": "0.0.1",
7+
"version": "0.0.2",
88
"license": "MIT",
99
"authors": [
1010
{

src/DNode/DNode.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,11 @@ protected function handleConnection($stream, $params)
7575
});
7676

7777
while ($connected) {
78+
if (!$started) {
79+
$client->start();
80+
$started = true;
81+
}
82+
7883
$readables = array($stream);
7984
$priority = null;
8085

@@ -110,11 +115,6 @@ protected function handleConnection($stream, $params)
110115
}
111116
}
112117

113-
if (!$started) {
114-
$client->start();
115-
$started = true;
116-
}
117-
118118
if ($client->ready && !$readied) {
119119
if (isset($params['block'])) {
120120
call_user_func($params['block'], $client->remote, $client);

0 commit comments

Comments
 (0)