Remove unnecessary resetClientHelloParsing callback in AsyncSSLSocket
authorAnirudh Ramachandran <avr@fb.com>
Fri, 20 Nov 2015 16:35:40 +0000 (08:35 -0800)
committerfacebook-github-bot-1 <folly-bot@fb.com>
Fri, 20 Nov 2015 17:20:24 +0000 (09:20 -0800)
Summary: Remove unnecessary resetClientHelloParsing callback which causes problems wiht
Openssl 1.0.2

Reviewed By: knekritz

Differential Revision: D2664730

fb-gh-sync-id: d1b55ae493b4c92627ad41e7bf85f1e1a777bd2b

folly/io/async/AsyncSSLSocket.cpp

index d2520be..8874235 100644 (file)
@@ -977,8 +977,8 @@ AsyncSSLSocket::handleAccept() noexcept {
   }
 
   if (server_ && parseClientHello_) {
-    SSL_set_msg_callback_arg(ssl_, this);
     SSL_set_msg_callback(ssl_, &AsyncSSLSocket::clientHelloParsingCallback);
+    SSL_set_msg_callback_arg(ssl_, this);
   }
 
   errno = 0;
@@ -1575,7 +1575,6 @@ AsyncSSLSocket::clientHelloParsingCallback(int written, int version,
     return;
   }
   if (contentType != SSL3_RT_HANDSHAKE) {
-    sock->resetClientHelloParsing(ssl);
     return;
   }
   if (len == 0) {