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
+15-10Lines changed: 15 additions & 10 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,16 +146,19 @@ public function connect($uri)
@@ -172,23 +175,25 @@ public function connect($uri)
172
175
173
176
// stop buffering when 8 KiB have been read
174
177
if (isset($buffer[8192])) {
175
-
$deferred->reject(newRuntimeException('Proxy must not send more than 8 KiB of headers'));
178
+
$deferred->reject(newRuntimeException('Proxy must not send more than 8 KiB of headers (EMSGSIZE)', defined('SOCKET_EMSGSIZE') ? SOCKET_EMSGSIZE : 90));
176
179
$stream->close();
177
180
}
178
181
};
179
182
$stream->on('data', $fn);
180
183
181
184
$stream->on('error', function (Exception$e) use ($deferred) {
182
-
$deferred->reject(newRuntimeException('Stream error while waiting for response from proxy', 0, $e));
185
+
$deferred->reject(newRuntimeException('Stream error while waiting for response from proxy (EIO)', defined('SOCKET_EIO') ? SOCKET_EIO : 5, $e));
183
186
});
184
187
185
188
$stream->on('close', function () use ($deferred) {
186
-
$deferred->reject(newRuntimeException('Connection to proxy lost while waiting for response'));
189
+
$deferred->reject(newRuntimeException('Connection to proxy lost while waiting for response (ECONNRESET)', defined('SOCKET_ECONNRESET') ? SOCKET_ECONNRESET : 104));
0 commit comments