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
@@ -207,23 +217,33 @@ public function connect($uri)
207
217
208
218
// stop buffering when 8 KiB have been read
209
219
if (isset($buffer[8192])) {
210
-
$deferred->reject(newRuntimeException('Proxy must not send more than 8 KiB of headers (EMSGSIZE)', defined('SOCKET_EMSGSIZE') ? SOCKET_EMSGSIZE : 90));
220
+
$deferred->reject(newRuntimeException(
221
+
'Connection to ' . $uri . ' failed because proxy response headers exceed maximum of 8 KiB (EMSGSIZE)',
222
+
defined('SOCKET_EMSGSIZE') ? SOCKET_EMSGSIZE : 90
223
+
));
211
224
$stream->close();
212
225
}
213
226
});
214
227
215
-
$stream->on('error', function (Exception$e) use ($deferred) {
216
-
$deferred->reject(newRuntimeException('Stream error while waiting for response from proxy (EIO)', defined('SOCKET_EIO') ? SOCKET_EIO : 5, $e));
228
+
$stream->on('error', function (Exception$e) use ($deferred, $uri) {
229
+
$deferred->reject(newRuntimeException(
230
+
'Connection to ' . $uri . ' failed because connection to proxy caused a stream error (EIO)',
231
+
defined('SOCKET_EIO') ? SOCKET_EIO : 5,
232
+
$e
233
+
));
217
234
});
218
235
219
-
$stream->on('close', function () use ($deferred) {
220
-
$deferred->reject(newRuntimeException('Connection to proxy lost while waiting for response (ECONNRESET)', defined('SOCKET_ECONNRESET') ? SOCKET_ECONNRESET : 104));
236
+
$stream->on('close', function () use ($deferred, $uri) {
237
+
$deferred->reject(newRuntimeException(
238
+
'Connection to ' . $uri . ' failed because connection to proxy was lost while waiting for response (ECONNRESET)',
0 commit comments