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/ProxyConnector.php
+6-6Lines changed: 6 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -128,7 +128,7 @@ public function connect($uri)
128
128
129
129
return$this->connector->connect($proxyUri)->then(function (ConnectionInterface$stream) use ($host, $port, $auth) {
130
130
$deferred = newDeferred(function ($_, $reject) use ($stream) {
131
-
$reject(newRuntimeException('Operation canceled while waiting for response from proxy'));
131
+
$reject(newRuntimeException('Connection canceled while waiting for response from proxy (ECONNABORTED)', defined('SOCKET_ECONNABORTED') ? SOCKET_ECONNABORTED : 103));
132
132
$stream->close();
133
133
});
134
134
@@ -146,14 +146,14 @@ public function connect($uri)
@@ -172,18 +172,18 @@ public function connect($uri)
172
172
173
173
// stop buffering when 8 KiB have been read
174
174
if (isset($buffer[8192])) {
175
-
$deferred->reject(newRuntimeException('Proxy must not send more than 8 KiB of headers'));
175
+
$deferred->reject(newRuntimeException('Proxy must not send more than 8 KiB of headers (EMSGSIZE)', defined('SOCKET_EMSGSIZE') ? SOCKET_EMSGSIZE : 90));
176
176
$stream->close();
177
177
}
178
178
};
179
179
$stream->on('data', $fn);
180
180
181
181
$stream->on('error', function (Exception$e) use ($deferred) {
182
-
$deferred->reject(newRuntimeException('Stream error while waiting for response from proxy', 0, $e));
182
+
$deferred->reject(newRuntimeException('Stream error while waiting for response from proxy (EIO)', defined('SOCKET_EIO') ? SOCKET_EIO : 5, $e));
183
183
});
184
184
185
185
$stream->on('close', function () use ($deferred) {
186
-
$deferred->reject(newRuntimeException('Connection to proxy lost while waiting for response'));
186
+
$deferred->reject(newRuntimeException('Connection to proxy lost while waiting for response (ECONNRESET)', defined('SOCKET_ECONNRESET') ? SOCKET_ECONNRESET : 104));
0 commit comments