Skip to content

Commit 4426080

Browse files
trevnorrisMylesBorins
authored andcommitted
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 ff1d61c commit 4426080

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
@@ -391,12 +391,6 @@ TLSSocket.prototype._wrapHandle = function(wrap) {
391391
res = null;
392392
});
393393

394-
if (wrap) {
395-
wrap.on('close', function() {
396-
res.onStreamClose();
397-
});
398-
}
399-
400394
return res;
401395
};
402396

src/tls_wrap.cc

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

792792

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

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

src/tls_wrap.h

-1
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,6 @@ class TLSWrap : public AsyncWrap,
138138
static void EnableCertCb(
139139
const v8::FunctionCallbackInfo<v8::Value>& args);
140140
static void DestroySSL(const v8::FunctionCallbackInfo<v8::Value>& args);
141-
static void OnStreamClose(const v8::FunctionCallbackInfo<v8::Value>& args);
142141

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

0 commit comments

Comments
 (0)