Skip to content

Commit a9cfa5d

Browse files
Arthur Guigandcboden
authored andcommitted
fixes #288
data test updated -> handleData($stream)
1 parent 263bfa6 commit a9cfa5d

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Connection.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,11 @@ public function handleData($stream)
1111
// Socket is raw, not using fread as it's interceptable by filters
1212
// See issues #192, #209, and #240
1313
$data = stream_socket_recvfrom($stream, $this->bufferSize);
14+
if( '' != $data || false != $data ){
15+
$this->emit('data', array($data, $this));
16+
}
1417
if ('' === $data || false === $data || feof($stream)) {
1518
$this->end();
16-
} else {
17-
$this->emit('data', array($data, $this));
1819
}
1920
}
2021

0 commit comments

Comments
 (0)