Commit d26a3806 authored by Kyle Nekritz's avatar Kyle Nekritz Committed by facebook-github-bot-9

Check if handshake timeout is set in AsyncSSLSocket::isDetachable().

Summary: If it is, return false.

Reviewed By: @siyengar

Differential Revision: D2503765

fb-gh-sync-id: 36b5e2e8cabc2a5157735637be6ca3414005da81
parent f63b0805
......@@ -323,10 +323,10 @@ class AsyncSSLSocket : public virtual AsyncSocket {
/**
* Initiate an SSL connection on the socket
* THe callback will be invoked and uninstalled when an SSL connection
* The callback will be invoked and uninstalled when an SSL connection
* has been establshed on the underlying socket.
* The verification option verifyPeer is applied if its passed explicitly.
* If its not, the options in SSLContext set on the underying SSLContext
* The verification option verifyPeer is applied if it's passed explicitly.
* If it's not, the options in SSLContext set on the underlying SSLContext
* are applied.
*
* @param callback callback object to invoke on success/failure
......@@ -488,6 +488,10 @@ class AsyncSSLSocket : public virtual AsyncSocket {
handshakeTimeout_.detachEventBase();
}
virtual bool isDetachable() const override {
return AsyncSocket::isDetachable() && !handshakeTimeout_.isScheduled();
}
virtual void attachTimeoutManager(TimeoutManager* manager) {
handshakeTimeout_.attachTimeoutManager(manager);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment