@@ -578,15 +578,15 @@ private function sendRawRequest(string $host, int $port, string $rawRequest)
578578 $ this ->logger ->info ('Bedrock\Client - socket_connect returned error 115, waiting for connection to complete. ' , [
579579 'host ' => $ host ,
580580 'connect_attempt_time_ms ' => round ($ connectTime , 3 ),
581- 'pid ' => getmypid ()
581+ 'pid ' => getmypid (),
582582 ]);
583-
583+
584584 // Wait for the socket to be ready for writing after EINPROGRESS
585585 $ write = [$ this ->socket ];
586586 $ read = [];
587587 $ except = [];
588588 $ selectResult = socket_select ($ read , $ write , $ except , $ this ->connectionTimeout , $ this ->connectionTimeoutMicroseconds );
589-
589+
590590 if ($ selectResult === false ) {
591591 $ socketError = socket_strerror (socket_last_error ($ this ->socket ));
592592 throw new ConnectionFailure ("socket_select failed after EINPROGRESS for $ host: $ port. Error: $ socketError " );
@@ -597,17 +597,17 @@ private function sendRawRequest(string $host, int $port, string $rawRequest)
597597 $ socketError = socket_strerror ($ socketErrorCode );
598598 throw new ConnectionFailure ("Socket had error after EINPROGRESS for $ host: $ port. Error: $ socketErrorCode $ socketError " );
599599 }
600-
600+
601601 $ selectTime = (microtime (true ) - $ connectStart ) * 1000 ; // Total time from connect to ready
602-
602+
603603 // Set socket back to blocking mode for normal operations
604604 socket_set_block ($ this ->socket );
605-
605+
606606 $ this ->logger ->info ('Bedrock\Client - Socket ready for writing after EINPROGRESS. ' , [
607607 'host ' => $ host ,
608608 'total_connection_time_ms ' => round ($ selectTime , 3 ),
609609 'select_wait_time_ms ' => round ($ selectTime - $ connectTime , 3 ),
610- 'pid ' => getmypid ()
610+ 'pid ' => getmypid (),
611611 ]);
612612 } elseif ($ socketErrorCode ) {
613613 $ socketError = socket_strerror ($ socketErrorCode );
0 commit comments