Skip to content

Commit 858bbaa

Browse files
trevnorrisMylesBorins
authored andcommittedApr 19, 2017
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 <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Anna Henningsen <[email protected]>
1 parent 457c47d commit 858bbaa

File tree

3 files changed

+0
-16
lines changed

3 files changed

+0
-16
lines changed
 

‎lib/_tls_wrap.js

-6
Original file line numberDiff line numberDiff line change
@@ -378,12 +378,6 @@ TLSSocket.prototype._wrapHandle = function(wrap) {
378378
res = null;
379379
});
380380

381-
if (wrap) {
382-
wrap.on('close', function() {
383-
res.onStreamClose();
384-
});
385-
}
386-
387381
return res;
388382
};
389383

‎src/tls_wrap.cc

-9
Original file line numberDiff line numberDiff line change
@@ -789,14 +789,6 @@ void TLSWrap::EnableSessionCallbacks(
789789
}
790790

791791

792-
void TLSWrap::OnStreamClose(const FunctionCallbackInfo<Value>& args) {
793-
TLSWrap* wrap;
794-
ASSIGN_OR_RETURN_UNWRAP(&wrap, args.Holder());
795-
796-
wrap->stream_ = nullptr;
797-
}
798-
799-
800792
void TLSWrap::DestroySSL(const FunctionCallbackInfo<Value>& args) {
801793
TLSWrap* wrap;
802794
ASSIGN_OR_RETURN_UNWRAP(&wrap, args.Holder());
@@ -927,7 +919,6 @@ void TLSWrap::Initialize(Local<Object> target,
927919
env->SetProtoMethod(t, "enableSessionCallbacks", EnableSessionCallbacks);
928920
env->SetProtoMethod(t, "destroySSL", DestroySSL);
929921
env->SetProtoMethod(t, "enableCertCb", EnableCertCb);
930-
env->SetProtoMethod(t, "onStreamClose", OnStreamClose);
931922

932923
StreamBase::AddMethods<TLSWrap>(env, t, StreamBase::kFlagHasWritev);
933924
SSLWrap<TLSWrap>::AddMethods(env, t);

‎src/tls_wrap.h

-1
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,6 @@ class TLSWrap : public AsyncWrap,
140140
static void EnableCertCb(
141141
const v8::FunctionCallbackInfo<v8::Value>& args);
142142
static void DestroySSL(const v8::FunctionCallbackInfo<v8::Value>& args);
143-
static void OnStreamClose(const v8::FunctionCallbackInfo<v8::Value>& args);
144143

145144
#ifdef SSL_CTRL_SET_TLSEXT_SERVERNAME_CB
146145
static void GetServername(const v8::FunctionCallbackInfo<v8::Value>& args);

0 commit comments

Comments
 (0)
Please sign in to comment.