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() {
86
86
sni_context_.Reset ();
87
87
#endif // SSL_CTRL_SET_TLSEXT_SERVERNAME_CB
88
88
89
- // Move all writes to pending
90
- MakePending ();
91
-
92
- // And destroy
93
- InvokeQueued (UV_ECANCELED);
94
-
95
89
ClearError ();
96
90
}
97
91
@@ -770,7 +764,16 @@ void TLSWrap::EnableSessionCallbacks(
770
764
771
765
void TLSWrap::DestroySSL (const FunctionCallbackInfo<Value>& args) {
772
766
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
773
775
wrap->SSLWrap <TLSWrap>::DestroySSL ();
776
+
774
777
delete wrap->clear_in_ ;
775
778
wrap->clear_in_ = nullptr ;
776
779
}
You can’t perform that action at this time.
0 commit comments