tls: re-enable `.writev()` on TLSWrap
authorFedor Indutny <fedor@indutny.com>
Sat, 14 Mar 2015 05:41:26 +0000 (22:41 -0700)
committerFedor Indutny <fedor@indutny.com>
Sun, 15 Mar 2015 04:08:38 +0000 (21:08 -0700)
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.

PR-URL: https://github.com/iojs/io.js/pull/1155
Reviewed-By: Bert Belder <bertbelder@gmail.com>
src/tls_wrap.cc

index 0fab952..13ba550 100644 (file)
@@ -827,7 +827,7 @@ void TLSWrap::Initialize(Handle<Object> target,
   env->SetProtoMethod(t, "enableSessionCallbacks", EnableSessionCallbacks);
   env->SetProtoMethod(t, "enableHelloParser", EnableHelloParser);
 
-  StreamBase::AddMethods<TLSWrap>(env, t);
+  StreamBase::AddMethods<TLSWrap>(env, t, StreamBase::kFlagHasWritev);
   SSLWrap<TLSWrap>::AddMethods(env, t);
 
 #ifdef SSL_CTRL_SET_TLSEXT_SERVERNAME_CB