-
Notifications
You must be signed in to change notification settings - Fork 7.3k
connection.destroy() during http req setTimeout() causes TypeError #3231
Comments
This: clientReq.setTimeout(1000, function () {
clientReq.connection.destroy();
...
}); should be: clientReq.setTimeout(function () {
clientReq.connection.destroy();
...
}, 1000); |
Which Per http://nodejs.org/api/net.html#socket.setTimeout,
|
Ah ok, I didn't realize the order was reversed for socket setTimeout. |
Doesn't timeout already destroy the connection? (I know it says it doesn't in the documentation, haha)
Because |
True, I missed that. I guess the refactoring that went into 0.6.17 makes this explicit. |
@s3u Can you post a complete test case? |
I'm encountering this in production on heroku as well now, reverting to 0.6.16 in the interim. |
Failing test case added in e02af94. |
@bnoordhuis Thanks. Was just to submit one. |
@s3u Can you check if b4fbf6d resolves your issue? |
@bnoordhuis it does. Thanks. |
Great, thanks for testing. |
* windows: skip GetFileAttributes call when opening a file (Bert Belder) * crypto: add PKCS12/PFX support (Sambasiva Suda) * #3240: child_process: delete NODE_CHANNEL_FD from env in spawn (Ben Noordhuis) * windows: add test for path.normalize with UNC paths (Bert Belder) * windows: make path.normalize convert all slashes to backslashes (Bert Belder) * fs: Automatically close FSWatcher on error (Bert Belder) * #3258: fs.ReadStream.pause() emits duplicate data event (koichik) * pipe_wrap: don't assert() on pipe accept errors (Ben Noordhuis) * Better exception output for module load and process.nextTick (Felix Geisendörfer) * zlib: fix error reporting (Ben Noordhuis) * http: Don't destroy on timeout (isaacs) * #3231: http: Don't try to emit error on a null'ed req object (isaacs) * #3236: http: Refactor ClientRequest.onSocket (isaacs)
* windows: skip GetFileAttributes call when opening a file (Bert Belder) * crypto: add PKCS12/PFX support (Sambasiva Suda) * #3240: child_process: delete NODE_CHANNEL_FD from env in spawn (Ben Noordhuis) * windows: add test for path.normalize with UNC paths (Bert Belder) * windows: make path.normalize convert all slashes to backslashes (Bert Belder) * fs: Automatically close FSWatcher on error (Bert Belder) * #3258: fs.ReadStream.pause() emits duplicate data event (koichik) * pipe_wrap: don't assert() on pipe accept errors (Ben Noordhuis) * Better exception output for module load and process.nextTick (Felix Geisendörfer) * zlib: fix error reporting (Ben Noordhuis) * http: Don't destroy on timeout (isaacs) * #3231: http: Don't try to emit error on a null'ed req object (isaacs) * #3236: http: Refactor ClientRequest.onSocket (isaacs)
causes
This is a regression in v0.6.17. This does not happen in v0.6.16.
The text was updated successfully, but these errors were encountered: