Fix assertion in unit test
authorSubodh Iyengar <subodh@fb.com>
Thu, 1 Dec 2016 14:39:24 +0000 (06:39 -0800)
committerFacebook Github Bot <facebook-github-bot-bot@fb.com>
Thu, 1 Dec 2016 14:53:46 +0000 (06:53 -0800)
Summary:
Fix test for AsyncSSLSocket. When a timeout
occurs during a handshake it's possible that
invokeConnectError is called with sslState_ ==
CONNECTING. This just removes the assertion in
this case. This doesnt affect prod code, only
tests

Reviewed By: yfeldblum

Differential Revision: D4252677

fbshipit-source-id: 4db3a94ae28aa140546554c087bedcee7f06d201

folly/io/async/AsyncSSLSocket.cpp

index f8e6b47104d245ed5e504ea03910efb57ebe60c4..242e0b26bad7665b8c12289b7f393dddf1684359 100644 (file)
@@ -1128,7 +1128,6 @@ void AsyncSSLSocket::invokeConnectErr(const AsyncSocketException& ex) {
   connectionTimeout_.cancelTimeout();
   AsyncSocket::invokeConnectErr(ex);
   if (sslState_ == SSLStateEnum::STATE_CONNECTING) {
-    assert(tfoAttempted_);
     if (handshakeTimeout_.isScheduled()) {
       handshakeTimeout_.cancelTimeout();
     }