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

Need help. proxy webSocket - Error: read ECONNRESET #327

Closed
yesongling opened this issue Mar 4, 2019 · 2 comments
Closed

Need help. proxy webSocket - Error: read ECONNRESET #327

yesongling opened this issue Mar 4, 2019 · 2 comments

Comments

@yesongling
Copy link

yesongling commented Mar 4, 2019

Is this a question?

Using HPM to proxy webSocket. But once webSocket server shut down, HPM server will catch this error and crash.

The root cause seem to be an error event has not been handled. But I dont know where to handle it.

Env
Node: 10.8.0
HPM: 0.19.0
System: Mac OS 10.13.6

Error logs & config
events.js:167
throw er; // Unhandled 'error' event
^

Error: read ECONNRESET
at TCP.onread (net.js:660:25)
Emitted 'error' event at:
at emitErrorNT (internal/streams/destroy.js:82:8)
at emitErrorAndCloseNT (internal/streams/destroy.js:50:3)
at process._tickCallback (internal/process/next_tick.js:63:19)

image

Is this a bug report?

(write your answer here)

Is this a feature request?

(write your answer here)

Steps to reproduce

(Write your steps here:)

Expected behavior

(Write what you thought would happen.)

Actual behavior

(Write what happened.)

Setup

  • http-proxy-middleware: version
  • http-proxy-middleware configuration
  • server: connect/express/browser-sync... + version
  • other relevant modules

client info

target server info

Reproducible Demo

(Paste the link to an example project and exact instructions to reproduce the issue.)

@yesongling
Copy link
Author

Fixed.
Handle error on upgrade callback can fix it.
image

@chimurai
Copy link
Owner

chimurai commented Mar 4, 2019

thanks for sharing your solution!

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

No branches or pull requests

2 participants