★ wanayoo — archive 1999 https://github.com/nodejs/node/commit/f87b3a72cdNouvelle recherche | Portail wanayoo
Skip to content
Permalink
Browse files
tls: add CHECK for impossible condition
PR-URL: #26843
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Minwoo Jung <minwoo@nodesource.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
  • Loading branch information
addaleax committed Mar 26, 2019
1 parent 553c876 commit f87b3a72cde17788bfd87eda16dd24117f5f4b02
Showing with 4 additions and 4 deletions.
  1. +4 −4 src/tls_wrap.cc
@@ -747,10 +747,10 @@ void TLSWrap::OnStreamRead(ssize_t nread, const uv_buf_t& buf) {
return;
}

if (ssl_ == nullptr) {
EmitRead(UV_EPROTO);
return;
}
// DestroySSL() is the only thing that un-sets ssl_, but that also removes
// this TLSWrap as a stream listener, so we should not receive OnStreamRead()
// calls anymore.
CHECK(ssl_);

// Commit the amount of data actually read into the peeked/allocated buffer
// from the underlying stream.

0 comments on commit f87b3a7

Please sign in to comment.