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?
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?
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?
I'm sorry I don't understand what you are saying.
so, any clue about this problem? at least, do you know if the bug is inside the core node api?
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.