From: Subodh Iyengar Date: Thu, 1 Dec 2016 14:39:24 +0000 (-0800) Subject: Fix assertion in unit test X-Git-Tag: v2016.12.05.00~6 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=7c8f000f43d6f89406e939ddc59da687ba040b78;p=folly.git Fix assertion in unit test 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 --- diff --git a/folly/io/async/AsyncSSLSocket.cpp b/folly/io/async/AsyncSSLSocket.cpp index f8e6b471..242e0b26 100644 --- a/folly/io/async/AsyncSSLSocket.cpp +++ b/folly/io/async/AsyncSSLSocket.cpp @@ -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(); }