diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/node_crypto.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/node_crypto.cc b/src/node_crypto.cc index 3c0e76d79..eb7e5546c 100644 --- a/src/node_crypto.cc +++ b/src/node_crypto.cc @@ -1476,7 +1476,9 @@ Handle<Value> Connection::ClearIn(const Arguments& args) { int bytes_written = SSL_write(ss->ssl_, buffer_data + off, len); - ss->HandleSSLError("SSL_write:ClearIn", bytes_written, kZeroIsAnError); + ss->HandleSSLError("SSL_write:ClearIn", + bytes_written, + len == 0 ? kZeroIsNotAnError : kZeroIsAnError); ss->SetShutdownFlags(); return scope.Close(Integer::New(bytes_written)); |