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

socket hang up when using node-inspector #59

Closed
floydwch opened this issue Mar 31, 2016 · 5 comments
Closed

socket hang up when using node-inspector #59

floydwch opened this issue Mar 31, 2016 · 5 comments

Comments

@floydwch
Copy link
Contributor

Socket hang up when using node-inspector to pause the execution, to be more exact, the socket hang up when the execution is continued.

node_modules/hotel/node_modules/http-proxy/lib/http-proxy/index.js:119
    throw err;
    ^

Error: socket hang up
    at createHangUpError (_http_client.js:239:15)
    at Socket.socketCloseListener (_http_client.js:271:23)
    at emitOne (events.js:95:20)
    at Socket.emit (events.js:182:7)
    at TCP._onclose (net.js:477:12)
@floydwch
Copy link
Contributor Author

This issue seems to have the same root cause with this PR:
#61

@typicode
Copy link
Owner

typicode commented Apr 1, 2016

Hey, thank you for the PR and link to http-proxy issue 👍
By the way, I'm not familiar with node-inspector how could I reproduce the error?

@floydwch
Copy link
Contributor Author

floydwch commented Apr 1, 2016

@typicode Install node-inspector via npm i -g node-inspector, then start the nodejs app with --debug to enable node's debug mode, i.e. node --debug app.js. Node will listen to the port 5858 to wait for node-inspector, then run node-inspector.

node-inspector will listen to the port 8080 and take a parameter to specify the node app's debug port, i.e. http://127.0.0.1:8080/?port=5858. Visit the url then set a breakpoint on the app's source code from the panel.

Finally, trigger the breakpoint from the node app's page i.e. go to http://app.dev, and it'll pause on the breakpoint then resume its execution, and you'll encounter the issue.

@typicode
Copy link
Owner

typicode commented Apr 1, 2016

Awesome, thanks :)

@typicode
Copy link
Owner

typicode commented Apr 3, 2016

Fix released in v0.4.9

@typicode typicode closed this as completed Apr 3, 2016
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