Merge remote-tracking branch 'ry/v0.10'
[platform/upstream/nodejs.git] / src / node_crypto.cc
index 5adb7e5..37a7c25 100644 (file)
@@ -945,6 +945,11 @@ int Connection::HandleSSLError(const char* func, int rv, ZeroStatus zs) {
     DEBUG_PRINT("[%p] SSL: %s want read\n", ssl_, func);
     return 0;
 
+  } else if (err == SSL_ERROR_ZERO_RETURN) {
+    handle_->Set(String::New("error"),
+                 Exception::Error(String::New("ZERO_RETURN")));
+    return rv;
+
   } else {
     HandleScope scope(node_isolate);
     BUF_MEM* mem;