Skip to content

fix: check if socket is destroyed before writing to it#1433

Open
flotwig wants to merge 1 commit intohttp-party:masterfrom
cypress-io:ws-fix-socket-ended-error
Open

fix: check if socket is destroyed before writing to it#1433
flotwig wants to merge 1 commit intohttp-party:masterfrom
cypress-io:ws-fix-socket-ended-error

Conversation

@flotwig
Copy link
Copy Markdown

@flotwig flotwig commented Apr 6, 2020

Fixes #1432

net_socket.destroyed appears to exist as of at least Node 6.0.0 👍

@theomessin
Copy link
Copy Markdown

Bump

pi0 added a commit to unjs/httpxy that referenced this pull request Mar 25, 2026
…onse

guard against writing to an already-destroyed client socket when the
upstream responds with a plain HTTP response instead of a WebSocket
upgrade. applies to both ProxyServer.ws() and proxyUpgrade() paths.

ref: http-party/node-http-proxy#1433
@pi0
Copy link
Copy Markdown

pi0 commented Mar 25, 2026

This issue has been fixed in unjs/httpxy#113.

pi0 added a commit to unjs/httpxy that referenced this pull request Mar 25, 2026
…onse

guard against writing to an already-destroyed client socket when the
upstream responds with a plain HTTP response instead of a WebSocket
upgrade. applies to both ProxyServer.ws() and proxyUpgrade() paths.

ref: http-party/node-http-proxy#1433
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Uncatchable "This socket has been ended by the other party" when proxying websockets

3 participants