diff options
author | Anatoli Papirovski <apapirovski@mac.com> | 2017-10-25 19:04:41 -0400 |
---|---|---|
committer | James M Snell <jasnell@gmail.com> | 2017-10-29 10:01:16 -0700 |
commit | ca82e3088dfe204ab36baa492a3e399d46827453 (patch) | |
tree | 0d7f7d31ea9731b4300ba65e8477ed616a33ef2c /src/env.h | |
parent | 8a9be4175b17b574459bccb99d8b6e6be6db4070 (diff) | |
download | android-node-v8-ca82e3088dfe204ab36baa492a3e399d46827453.tar.gz android-node-v8-ca82e3088dfe204ab36baa492a3e399d46827453.tar.bz2 android-node-v8-ca82e3088dfe204ab36baa492a3e399d46827453.zip |
http2: fix several timeout related issues
* correctly reset write timers: currently reset timers on
both session & stream when write starts and when it ends.
* prevent large writes from timing out: when writing a large
chunk of data in http2, once the data is handed off to C++,
the JS session & stream lose all track of the write and will
timeout if the write doesn't complete within the timeout window
Fix this issue by tracking whether a write request is ongoing and
also tracking how many chunks have been sent since the most recent
write started. (Since each write call resets the timer.)
PR-URL: https://github.com/nodejs/node/pull/16525
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'src/env.h')
-rw-r--r-- | src/env.h | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -111,6 +111,7 @@ class ModuleWrap; V(callback_string, "callback") \ V(change_string, "change") \ V(channel_string, "channel") \ + V(chunks_sent_since_last_write_string, "chunksSentSinceLastWrite") \ V(constants_string, "constants") \ V(oncertcb_string, "oncertcb") \ V(onclose_string, "_onclose") \ |