From dc4cfc6dc5fe32e7f0f0a7204c4055b1fd09ff60 Mon Sep 17 00:00:00 2001 From: Fedor Indutny Date: Fri, 13 Mar 2015 22:41:26 -0700 Subject: [PATCH] tls: re-enable `.writev()` on TLSWrap Fix the `parallel/test-tls-over-http-tunnel.js` on Windows by re-enabling the accidentally disabled `.writev()` method on TLSWrap. It appears that there is some subtle issue with shutdown timing and it manifests itself when the chunks are written in separate packets. This leads to concurrent `shutdown`/`destroy`, which breaks the test. --- src/tls_wrap.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tls_wrap.cc b/src/tls_wrap.cc index 49523bc3b84955..4b079afc19b16f 100644 --- a/src/tls_wrap.cc +++ b/src/tls_wrap.cc @@ -825,7 +825,7 @@ void TLSWrap::Initialize(Handle target, env->SetProtoMethod(t, "enableSessionCallbacks", EnableSessionCallbacks); env->SetProtoMethod(t, "enableHelloParser", EnableHelloParser); - StreamBase::AddMethods(env, t); + StreamBase::AddMethods(env, t, StreamBase::kFlagHasWritev); SSLWrap::AddMethods(env, t); #ifdef SSL_CTRL_SET_TLSEXT_SERVERNAME_CB