Skip to content

Commit d08bd18

Browse files
Added error checking to stream_socket_accept (it can return false)
1 parent 1830e69 commit d08bd18

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/Connection/StreamSocketConnectionPool.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,10 @@ protected function acceptConnection(ConnectionHandlerFactoryInterface $connectio
114114
{
115115
$clientSocket = stream_socket_accept($this->serverSocket);
116116

117+
if (false === $clientSocket) {
118+
return;
119+
}
120+
117121
stream_set_blocking($clientSocket, 0);
118122

119123
$connection = new StreamSocketConnection($clientSocket);

0 commit comments

Comments
 (0)