diff options
author | Anna Henningsen <anna@addaleax.net> | 2019-03-21 16:45:44 +0100 |
---|---|---|
committer | Anna Henningsen <anna@addaleax.net> | 2019-03-26 12:00:52 +0100 |
commit | f87b3a72cde17788bfd87eda16dd24117f5f4b02 (patch) | |
tree | 2a457a99c0a84b94c019180287f54c9f4d64fa4f /src | |
parent | 553c876a24e237b745ae7f8d47e2c9c9eae1263f (diff) | |
download | android-node-v8-f87b3a72cde17788bfd87eda16dd24117f5f4b02.tar.gz android-node-v8-f87b3a72cde17788bfd87eda16dd24117f5f4b02.tar.bz2 android-node-v8-f87b3a72cde17788bfd87eda16dd24117f5f4b02.zip |
tls: add CHECK for impossible condition
PR-URL: https://github.com/nodejs/node/pull/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>
Diffstat (limited to 'src')
-rw-r--r-- | src/tls_wrap.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/tls_wrap.cc b/src/tls_wrap.cc index 0ca7ad7845..e092458dd9 100644 --- a/src/tls_wrap.cc +++ b/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. |