Skip to content

Commit

Permalink
[EventLoop][LibEv] Let stream remove event listener
Browse files Browse the repository at this point in the history
  • Loading branch information
cboden committed Jul 8, 2013
1 parent e08ffb9 commit 0fda846
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Connection.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class Connection extends Stream implements ConnectionInterface
public function handleData($stream)
{
$data = stream_socket_recvfrom($stream, $this->bufferSize);
if ('' === $data || false === $data) {
if ('' === $data || false === $data || feof($stream)) {
$this->end();
} else {
$this->emit('data', array($data, $this));
Expand Down

0 comments on commit 0fda846

Please sign in to comment.