Permalink
Browse files

Partial revert "tls: keep track of stream that is closed"

This partually reverts commit 4cdb0e8.

A nullptr check in TSLWrap::IsAlive() and the added test were left.

PR-URL: #11947
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
  • Loading branch information...
trevnorris authored and addaleax committed Mar 20, 2017
1 parent ee463d3 commit 595efd8b9a463886c20fb04103c508bd9c3630e7
Showing with 0 additions and 16 deletions.
  1. +0 −6 lib/_tls_wrap.js
  2. +0 −9 src/tls_wrap.cc
  3. +0 −1 src/tls_wrap.h
View
@@ -399,12 +399,6 @@ TLSSocket.prototype._wrapHandle = function(wrap) {
res = null;
});
if (wrap) {
wrap.on('close', function() {
res.onStreamClose();
});
}
return res;
};
View
@@ -815,14 +815,6 @@ void TLSWrap::EnableSessionCallbacks(
}
void TLSWrap::OnStreamClose(const FunctionCallbackInfo<Value>& args) {
TLSWrap* wrap;
ASSIGN_OR_RETURN_UNWRAP(&wrap, args.Holder());
wrap->stream_ = nullptr;
}
void TLSWrap::DestroySSL(const FunctionCallbackInfo<Value>& args) {
TLSWrap* wrap;
ASSIGN_OR_RETURN_UNWRAP(&wrap, args.Holder());
@@ -953,7 +945,6 @@ void TLSWrap::Initialize(Local<Object> target,
env->SetProtoMethod(t, "enableSessionCallbacks", EnableSessionCallbacks);
env->SetProtoMethod(t, "destroySSL", DestroySSL);
env->SetProtoMethod(t, "enableCertCb", EnableCertCb);
env->SetProtoMethod(t, "onStreamClose", OnStreamClose);
StreamBase::AddMethods<TLSWrap>(env, t, StreamBase::kFlagHasWritev);
SSLWrap<TLSWrap>::AddMethods(env, t);
View
@@ -161,7 +161,6 @@ class TLSWrap : public AsyncWrap,
static void EnableCertCb(
const v8::FunctionCallbackInfo<v8::Value>& args);
static void DestroySSL(const v8::FunctionCallbackInfo<v8::Value>& args);
static void OnStreamClose(const v8::FunctionCallbackInfo<v8::Value>& args);
#ifdef SSL_CTRL_SET_TLSEXT_SERVERNAME_CB
static void GetServername(const v8::FunctionCallbackInfo<v8::Value>& args);

0 comments on commit 595efd8

Please sign in to comment.