Commit 6fc754ff authored by Alex Dibert's avatar Alex Dibert Committed by Facebook Github Bot

Folly: AsyncSSLSocket good if uninit

Summary:
This allows to create a Channel with AsyncSSLSocket while evb in not looping yet.
Also add ssl channel tests to thrift.

Reviewed By: yfeldblum

Differential Revision: D6991017

fbshipit-source-id: 0852b18e03a6b9d072cb4ec0182f1a41a5960eef
parent e6b2e78a
......@@ -19,7 +19,6 @@
#include <folly/io/async/EventBase.h>
#include <folly/portability/Sockets.h>
#include <boost/noncopyable.hpp>
#include <errno.h>
#include <fcntl.h>
#include <sys/types.h>
......@@ -365,9 +364,11 @@ void AsyncSSLSocket::shutdownWriteNow() {
}
bool AsyncSSLSocket::good() const {
return (AsyncSocket::good() &&
(sslState_ == STATE_ACCEPTING || sslState_ == STATE_CONNECTING ||
sslState_ == STATE_ESTABLISHED || sslState_ == STATE_UNENCRYPTED));
return (
AsyncSocket::good() &&
(sslState_ == STATE_ACCEPTING || sslState_ == STATE_CONNECTING ||
sslState_ == STATE_ESTABLISHED || sslState_ == STATE_UNENCRYPTED ||
sslState_ == STATE_UNINIT));
}
// The TAsyncTransport definition of 'good' states that the transport is
......
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