diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/js_stream.cc | 2 | ||||
-rw-r--r-- | src/tls_wrap.cc | 7 |
2 files changed, 5 insertions, 4 deletions
diff --git a/src/js_stream.cc b/src/js_stream.cc index 6b7c4063e0..91041d0201 100644 --- a/src/js_stream.cc +++ b/src/js_stream.cc @@ -163,7 +163,7 @@ template <class Wrap> void JSStream::Finish(const FunctionCallbackInfo<Value>& args) { Wrap* w = Unwrap<Wrap>(args[0].As<Object>()); - w->Done(args[0]->Int32Value()); + w->Done(args[1]->Int32Value()); } diff --git a/src/tls_wrap.cc b/src/tls_wrap.cc index b8a648de92..d4c7c9055d 100644 --- a/src/tls_wrap.cc +++ b/src/tls_wrap.cc @@ -320,6 +320,10 @@ void TLSWrap::EncOutCb(WriteWrap* req_wrap, int status) { TLSWrap* wrap = req_wrap->wrap()->Cast<TLSWrap>(); req_wrap->Dispose(); + // We should not be getting here after `DestroySSL`, because all queued writes + // must be invoked with UV_ECANCELED + CHECK_NE(wrap->ssl_, nullptr); + // Handle error if (status) { // Ignore errors after shutdown @@ -331,9 +335,6 @@ void TLSWrap::EncOutCb(WriteWrap* req_wrap, int status) { return; } - if (wrap->ssl_ == nullptr) - return; - // Commit NodeBIO::FromBIO(wrap->enc_out_)->Read(nullptr, wrap->write_size_); |