File tree Expand file tree Collapse file tree 1 file changed +9
-6
lines changed
Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -86,12 +86,6 @@ TLSWrap::~TLSWrap() {
8686 sni_context_.Reset ();
8787#endif // SSL_CTRL_SET_TLSEXT_SERVERNAME_CB
8888
89- // Move all writes to pending
90- MakePending ();
91-
92- // And destroy
93- InvokeQueued (UV_ECANCELED);
94-
9589 ClearError ();
9690}
9791
@@ -770,7 +764,16 @@ void TLSWrap::EnableSessionCallbacks(
770764
771765void TLSWrap::DestroySSL (const FunctionCallbackInfo<Value>& args) {
772766 TLSWrap* wrap = Unwrap<TLSWrap>(args.Holder ());
767+
768+ // Move all writes to pending
769+ wrap->MakePending ();
770+
771+ // And destroy
772+ wrap->InvokeQueued (UV_ECANCELED);
773+
774+ // Destroy the SSL structure and friends
773775 wrap->SSLWrap <TLSWrap>::DestroySSL ();
776+
774777 delete wrap->clear_in_ ;
775778 wrap->clear_in_ = nullptr ;
776779}
You can’t perform that action at this time.
0 commit comments