Skip to content

Commit 803b64c

Browse files
Arthur Guigandcboden
authored andcommitted
fixes #288
data test updated -> handleData($stream)
1 parent f61be28 commit 803b64c

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/Socket/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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy