8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 9b96cd7 + bcb1930 commit 4daf81fCopy full SHA for 4daf81f
lib/http-proxy/passes/ws-incoming.js
@@ -111,7 +111,7 @@ module.exports = {
111
proxyReq.on('error', onOutgoingError);
112
proxyReq.on('response', function (res) {
113
// if upgrade event isn't going to happen, close the socket
114
- if (!res.upgrade) {
+ if (!res.upgrade && socket.readyState !== "closed") {
115
socket.write(createHttpHeader('HTTP/' + res.httpVersion + ' ' + res.statusCode + ' ' + res.statusMessage, res.headers));
116
res.pipe(socket);
117
}
0 commit comments