I'm not sure if this is the same bug, but the http.get() at
https://gist.github.com/865171
throws an exception if you wait a few seconds. (The server eventually
returns "ECONNRESET, Connection reset by peer.")
There's a patch at
https://gist.github.com/865174
which basically removes some of the error handling code that seems to
be bogus--the existing http code seemed expect to find some sort of
in-flight request in the request queue on socket error, but it seems
to me that it's possible for there to be no such request. (The
requests may have already been satisfied by other sockets, for
example.)
I haven't written any tests because I'm not sure how to simulate the
ECONNRESET--is there some way to do this?
Michael
--
You received this message because you are subscribed to the Google Groups "nodejs" group.
To post to this group, send email to nod...@googlegroups.com.
To unsubscribe from this group, send email to nodejs+un...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/nodejs?hl=en.
From reading through the node groups, it seems that there are several
socket and HTTP agent related issues in node at the moment. I've
discovered some while working on a proxy of my own[1], but various
problems crop up even with a simple bare bones HTTP proxy like
https://gist.github.com/824818
If you get this running, and then point a web browser at
http://www.nytimes.com/ and click around a bit, with any luck you'll
get an exception within a few page loads. Some of this can and should
be handled by application code (one server was returning a response
without headers, for example) but I think some are due to problems in
node's own libraries, similar to the mismatch between the socket array
and the request queue, and how errors are migrated from one to the
other.
Michael
1. https://github.com/ithinkihaveacat/node-fishback
--
http://beebo.org
+44 78 2118 9049