Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix socket read error when websocket upgrade failed #1439

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

houfeng0923
Copy link

@houfeng0923 houfeng0923 commented May 8, 2020

WebSocket proxy will throw below exception when target server not ready(target nginx return default http 502 response at current time).


Proxying websocket to /rest/realtime
events.js:298
      throw er; // Unhandled 'error' event
      ^
Error: read ECONNRESET
    at TLSWrap.onStreamRead (internal/stream_base_commons.js:205:27)
Emitted 'error' event on TLSSocket instance at:
    at errorOrDestroy (internal/streams/destroy.js:108:12)
    at TLSSocket.onerror (_stream_readable.js:746:7)
    at TLSSocket.emit (events.js:321:20)
    at emitErrorNT (internal/streams/destroy.js:92:8)
    at emitErrorAndCloseNT (internal/streams/destroy.js:60:3)
    at processTicksAndRejections (internal/process/task_queues.js:84:21) {
  errno: 'ECONNRESET',
  code: 'ECONNRESET',
  syscall: 'read'
}

BTW, If cause by websocket, i think the reason for this is the same as the issue #1017

@houfeng0923
Copy link
Author

BTW, it only happen in ssl mode

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.

None yet

2 participants