You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/Client.php
+15-12Lines changed: 15 additions & 12 deletions
Original file line number
Diff line number
Diff line change
@@ -185,6 +185,14 @@ public function handleConnectedSocks(ConnectionInterface $stream, $host, $port)
185
185
$reader = newStreamReader();
186
186
$stream->on('data', array($reader, 'write'));
187
187
188
+
$stream->on('error', $onError = function (Exception$e) use ($deferred) {
189
+
$deferred->reject(newRuntimeException('Stream error while waiting for response from proxy (EIO)', defined('SOCKET_EIO') ? SOCKET_EIO : 5, $e));
190
+
});
191
+
192
+
$stream->on('close', $onClose = function () use ($deferred) {
193
+
$deferred->reject(newRuntimeException('Connection to proxy lost while waiting for response (ECONNRESET)', defined('SOCKET_ECONNRESET') ? SOCKET_ECONNRESET : 104));
0 commit comments