File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed
Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,10 @@ public function createDaemon($kernel)
1919 {
2020 $ socket = fopen ('php://fd/ ' .DaemonInterface::FCGI_LISTENSOCK_FILENO , 'r ' );
2121
22+ if (false === $ socket ) {
23+ throw new \RuntimeException ('Could not open FCGI_LISTENSOCK_FILENO ' );
24+ }
25+
2226 return $ this ->createDaemonFromStreamSocket ($ kernel , $ socket );
2327 }
2428
@@ -29,7 +33,12 @@ public function createDaemon($kernel)
2933 */
3034 public function createTcpDaemon ($ kernel , $ port , $ host = 'localhost ' )
3135 {
32- $ socket = stream_socket_server ('tcp:// ' .$ host .': ' .$ port );
36+ $ address = 'tcp:// ' .$ host .': ' .$ port ;
37+ $ socket = stream_socket_server ($ address );
38+
39+ if (false === $ socket ) {
40+ throw new \RuntimeException ('Could not create stream socket server on: ' .$ address );
41+ }
3342
3443 return $ this ->createDaemonFromStreamSocket ($ kernel , $ socket );
3544 }
You can’t perform that action at this time.
0 commit comments