summaryrefslogtreecommitdiff
path: root/src/tls_wrap.h
diff options
context:
space:
mode:
authorAnatoli Papirovski <apapirovski@mac.com>2017-10-12 06:57:42 -0700
committerAnatoli Papirovski <apapirovski@mac.com>2017-10-21 09:49:02 -0400
commita627c5fc136b3233959e8e1bff90ae4b2d0ec322 (patch)
tree483d3bbe80573974a1e68e4b64b544051603e54c /src/tls_wrap.h
parentaaf2a1c2264fffd6eea82fe3778f41ac046e6349 (diff)
downloadandroid-node-v8-a627c5fc136b3233959e8e1bff90ae4b2d0ec322.tar.gz
android-node-v8-a627c5fc136b3233959e8e1bff90ae4b2d0ec322.tar.bz2
android-node-v8-a627c5fc136b3233959e8e1bff90ae4b2d0ec322.zip
net: fix timeouts during long writes
Add updateWriteQueueSize which updates and returns queue size (net & tls). Make _onTimeout check whether an active write is ongoing and if so, call _unrefTimer rather than emitting a timeout event. Add http & https test that checks whether long-lasting (but active) writes timeout or can finish writing as expected. PR-URL: https://github.com/nodejs/node/pull/15791 Fixes: https://github.com/nodejs/node/issues/15082 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com>
Diffstat (limited to 'src/tls_wrap.h')
-rw-r--r--src/tls_wrap.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/tls_wrap.h b/src/tls_wrap.h
index 8d75d6fcc9..99d2dc9121 100644
--- a/src/tls_wrap.h
+++ b/src/tls_wrap.h
@@ -188,6 +188,10 @@ class TLSWrap : public AsyncWrap,
// If true - delivered EOF to the js-land, either after `close_notify`, or
// after the `UV_EOF` on socket.
bool eof_;
+
+ private:
+ static void UpdateWriteQueueSize(
+ const v8::FunctionCallbackInfo<v8::Value>& args);
};
} // namespace node