Skip to content

Commit

Permalink
[Streams] Reset non-blocking to be safe
Browse files Browse the repository at this point in the history
  • Loading branch information
cboden committed Feb 17, 2014
1 parent 0fda846 commit 19bc0c4
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Connection.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ public function handleData($stream)
public function handleClose()
{
if (is_resource($this->stream)) {
// http://chat.stackoverflow.com/transcript/message/7727858#7727858
stream_socket_shutdown($this->stream, STREAM_SHUT_RDWR);
stream_set_blocking($this->stream, false);
fclose($this->stream);
}
}
Expand Down

0 comments on commit 19bc0c4

Please sign in to comment.