Skip to content

Commit 19bc0c4

Browse files
committed
[Streams] Reset non-blocking to be safe
1 parent 0fda846 commit 19bc0c4

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Connection.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,9 @@ public function handleData($stream)
2424
public function handleClose()
2525
{
2626
if (is_resource($this->stream)) {
27+
// http://chat.stackoverflow.com/transcript/message/7727858#7727858
2728
stream_socket_shutdown($this->stream, STREAM_SHUT_RDWR);
29+
stream_set_blocking($this->stream, false);
2830
fclose($this->stream);
2931
}
3032
}

0 commit comments

Comments
 (0)