File tree Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Original file line number Diff line number Diff line change @@ -285,13 +285,10 @@ private function getMessagesFromSocket( $socket ) {
285
285
throw new \Exception ( socket_strerror ( socket_last_error () ) );
286
286
}
287
287
288
- // Connection was dropped by peer
289
- if ( $ dataLen === 0 ) {
290
- // Don't read/write from/to this socket in the future
291
- $ this ->disconnect ( $ this ->sockets [ $ socketIndex ] );
292
- unset( $ this ->sockets [ $ socketIndex ] );
293
- return array ();
294
- }
288
+ // Connection was dropped by peer. We expects peers to be dropped only after
289
+ // $this->stop() has been called, so this is unexpected.
290
+ if ( $ dataLen === 0 )
291
+ throw new \Exception ( 'Socket disconnected unexpectedly ' );
295
292
296
293
$ this ->log ( 'Recvd ' . $ dataLen .' b from ' . $ socketIndex );
297
294
$ this ->populateMessageBuffer ( $ data , $ buffer );
You can’t perform that action at this time.
0 commit comments