File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed
Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -166,7 +166,7 @@ public function accept(int|float|null $timeout = null): SocketStream|null
166166 if ($ this ->getMetadata ('blocked ' ) === false && substr_count ($ e ->getMessage (), 'timed out ' ) > 0 ) {
167167 return null ;
168168 }
169- throw new StreamException (StreamException::SERVER_ACCEPT_ERR );
169+ throw new StreamException (StreamException::SERVER_ACCEPT_ERR , [], $ e );
170170 });
171171 return $ stream ? new SocketStream ($ stream ) : null ;
172172 }
Original file line number Diff line number Diff line change @@ -130,7 +130,9 @@ public function testBlockingServerTimeout(): void
130130 ], $ server ->getMetadata ());
131131 $ this ->expectException (StreamException::class);
132132 $ this ->expectExceptionCode (StreamException::SERVER_ACCEPT_ERR );
133- $ this ->expectExceptionMessage ('Could not accept on socket. ' );
133+ $ this ->expectExceptionMessageMatches (
134+ '/Could not accept on socket\. \(stream_socket_accept\(\):.*timed out.*\)/i '
135+ );
134136 $ stream = $ server ->accept (0 );
135137 $ server ->close ();
136138 }
You can’t perform that action at this time.
0 commit comments