remove always true if-predicate (gcc-5 -Wlogical-op)
authorIgor Sugak <sugak@fb.com>
Sun, 8 Jan 2017 05:58:13 +0000 (21:58 -0800)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Sun, 8 Jan 2017 06:02:55 +0000 (22:02 -0800)
Summary:
gcc-5 -Wlogical-op reports:
```lang=bash
folly/io/async/AsyncSSLSocket.cpp: In member function 'void folly::AsyncSSLSocket::invalidState(folly::AsyncSSLSocket::HandshakeCB*)':
folly/io/async/AsyncSSLSocket.cpp:418:35: error: logical 'or' of collectively exhaustive tests is always true [-Werror=logical-op]
```

Reviewed By: yfeldblum

Differential Revision: D4391317

fbshipit-source-id: c0f5ce748f1fc21678e4080c7f6351e7fada1e2b

folly/io/async/AsyncSSLSocket.cpp

index 7bb4ace..20cc963 100644 (file)
@@ -414,10 +414,7 @@ void AsyncSSLSocket::invalidState(HandshakeCB* callback) {
     callback->handshakeErr(this, ex);
   }
 
-  // Check the socket state not the ssl state here.
-  if (state_ != StateEnum::CLOSED || state_ != StateEnum::ERROR) {
-    failHandshake(__func__, ex);
-  }
+  failHandshake(__func__, ex);
 }
 
 void AsyncSSLSocket::sslAccept(