tls_wrap: invoke queued callbacks in DestroySSL
PR-URL: https://github.com/nodejs/io.js/pull/1702 Reviewed-By: Trevor Norris <trev.norris@gmail.com>
This commit is contained in:
parent
75930bb38c
commit
59d9734e21
@ -86,12 +86,6 @@ TLSWrap::~TLSWrap() {
|
|||||||
sni_context_.Reset();
|
sni_context_.Reset();
|
||||||
#endif // SSL_CTRL_SET_TLSEXT_SERVERNAME_CB
|
#endif // SSL_CTRL_SET_TLSEXT_SERVERNAME_CB
|
||||||
|
|
||||||
// Move all writes to pending
|
|
||||||
MakePending();
|
|
||||||
|
|
||||||
// And destroy
|
|
||||||
InvokeQueued(UV_ECANCELED);
|
|
||||||
|
|
||||||
ClearError();
|
ClearError();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -770,7 +764,16 @@ void TLSWrap::EnableSessionCallbacks(
|
|||||||
|
|
||||||
void TLSWrap::DestroySSL(const FunctionCallbackInfo<Value>& args) {
|
void TLSWrap::DestroySSL(const FunctionCallbackInfo<Value>& args) {
|
||||||
TLSWrap* wrap = Unwrap<TLSWrap>(args.Holder());
|
TLSWrap* wrap = Unwrap<TLSWrap>(args.Holder());
|
||||||
|
|
||||||
|
// Move all writes to pending
|
||||||
|
wrap->MakePending();
|
||||||
|
|
||||||
|
// And destroy
|
||||||
|
wrap->InvokeQueued(UV_ECANCELED);
|
||||||
|
|
||||||
|
// Destroy the SSL structure and friends
|
||||||
wrap->SSLWrap<TLSWrap>::DestroySSL();
|
wrap->SSLWrap<TLSWrap>::DestroySSL();
|
||||||
|
|
||||||
delete wrap->clear_in_;
|
delete wrap->clear_in_;
|
||||||
wrap->clear_in_ = nullptr;
|
wrap->clear_in_ = nullptr;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user