Skip to content

Loading…

request hangs when internet connection is broken #23

Closed
demian85 opened this Issue · 6 comments

2 participants

@demian85

That's what happened. I have a script that continuosly sends requests and while I was monitoring I noticed nothing happened for a while, then I realized my connection was down. I have to kill and restart the process for the request to continue. No error was sent to my callback, so how can i detect that? is there a timeout?

@mikeal
request member

if there error isn't happening that's a bad bug, and it's probably in node core, can you give some more specific steps to reproduce?

@demian85

I just made a simple test: https://gist.github.com/991389
I tried disconnecting and connecting again after 5 seconds and the callback gets called as expected. But fi i disconnect my network and enable it again after some time, everything breaks...
How can i capture a "network disconnected" error?

@mikeal
request member
@demian85

I'm sorry I don't understand what you are saying.

@demian85

so, any clue about this problem? at least, do you know if the bug is inside the core node api?

@mikeal
request member

this was a core problem that i've fixed in the HTTP client rewrite for core. we have to live with it in 0.4.x because we can't reliably get at the socket when it gets assigned.

@mikeal mikeal closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.