Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit c80a201

Browse files
authoredMar 2, 2025··
Merge pull request #153 from Styopchik/master
Handle WS connection exception in Connector
2 parents f8d9605 + a6c090b commit c80a201

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed
 

‎src/Connector.php

+2
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,8 @@ public function __invoke($url, array $subProtocols = [], array $headers = []) {
7474
$stream->on('close', $earlyClose);
7575
$futureWsConn->promise()->then(function() use ($stream, $earlyClose) {
7676
$stream->removeListener('close', $earlyClose);
77+
}, function (\Exception $exception) use ($futureWsConn) {
78+
$futureWsConn->reject($exception);
7779
});
7880

7981
$buffer = '';

0 commit comments

Comments
 (0)
Please sign in to comment.