crypto: fix incorrect ssl shutdown check
authorTom Hughes <tom.hughes@palm.com>
Fri, 5 Aug 2011 22:22:54 +0000 (15:22 -0700)
committerBen Noordhuis <info@bnoordhuis.nl>
Tue, 9 Aug 2011 21:54:49 +0000 (23:54 +0200)
src/node_crypto.cc

index f07bf78..2124348 100644 (file)
@@ -1170,7 +1170,7 @@ Handle<Value> Connection::ReceivedShutdown(const Arguments& args) {
   if (ss->ssl_ == NULL) return False();
   int r = SSL_get_shutdown(ss->ssl_);
 
-  if (r | SSL_RECEIVED_SHUTDOWN) return True();
+  if (r & SSL_RECEIVED_SHUTDOWN) return True();
 
   return False();
 }