-
Notifications
You must be signed in to change notification settings - Fork 7.3k
Race condition in http.ClientRequest causes socket to hang up upon req.write(). #2827
Comments
Summary, please correct me if I'm wrong. Gist: https://gist.github.com/1889610 Problem: Chunks written to a socket which is used by an HTTP request in the Possible solutions:
|
it summarizes correctly the issue @isaacs. I am also more inclined towards number 2. It's just to make sure that the first req.write() sends the request along with headers and before the |
Oh, actually, number 2 might not be an option in v0.6. It would break the optimization we have to send the response in a single packet when you do I'm inclined to just document this wart, and fix it properly in master. |
I am fine having it documented. I'll be also extremely useful to have the events model or state machines documented somewhere, so that people can better understand how modules like net and http interact between each other through those events. |
Actually, cause of this is |
@isaacs Can you review koichik/node@f15885c (for v0.6 branch)? |
boom!, that made it @koichik. Nicely done, it's working fine for me. |
@koichik Looks good to me. Land at will. |
@isaacs Thanks, merging. |
* Upgrade V8 to 3.6.6.24 * dtrace ustack helper improvements (Dave Pacheco) * API Documentation refactor (isaacs) * nodejs#2827 net: fix race write() before and after connect() (koichik) * nodejs#2554 nodejs#2567 throw if fs args for 'start' or 'end' are strings (AJ ONeal) * punycode: Update to v1.0.0 (Mathias Bynens) * Make a fat binary for the OS X pkg (isaacs) * Fix hang on accessing process.stdin (isaacs) * repl: make tab completion work on non-objects (Nathan Rajlich) * Fix fs.watch on OS X (Ben Noordhuis) * Fix nodejs#2515 nested setTimeouts cause premature process exit (Ben Noordhuis) * windows: fix time conversion in stat (Igor Zinkovsky) * windows: fs: handle EOF in read (Brandon Philips) * windows: avoid IOCP short-circuit on non-ifs lsps (Igor Zinkovsky) * Upgrade npm to 1.1.4 (isaacs) - windows fixes - Bundle nested bundleDependencies properly - install: support --save with url install targets - shrinkwrap: behave properly with url-installed modules - support installing uncompressed tars or single file modules from urls etc. - don't run make clean on rebuild - support HTTPS-over-HTTP proxy tunneling
I already described and discussed this issue with @mikeal in #2812. He agreed in that it may be a bug.
The text was updated successfully, but these errors were encountered: