Commit 02fe20e3 authored by Mingtao Yang's avatar Mingtao Yang Committed by Facebook Github Bot

Explicitly initialize AsyncSocket in MockAsyncSSLSocket

Summary:
Even though MockAsyncSSLSocket's initializes AsyncSSLSocket, which should
initialize AsyncSocket, this does not actually happen because AsyncSSLSocket
virtually inherits from AsyncSocket.

Because of this, prior to this diff, the MockAsyncSSLSocket was not properly
setting its EventBase.

Reviewed By: knekritz

Differential Revision: D5676596

fbshipit-source-id: 5f3c0e848179cb5eb4d2dc4921a11e7c04d7c0e0
parent 1eccb2e6
......@@ -23,11 +23,11 @@ namespace folly { namespace test {
class MockAsyncSSLSocket : public AsyncSSLSocket {
public:
MockAsyncSSLSocket(
const std::shared_ptr<SSLContext>& ctx,
EventBase* base,
bool deferSecurityNegotiation = false) :
AsyncSSLSocket(ctx, base, deferSecurityNegotiation) {
}
const std::shared_ptr<SSLContext>& ctx,
EventBase* base,
bool deferSecurityNegotiation = false)
: AsyncSocket(base),
AsyncSSLSocket(ctx, base, deferSecurityNegotiation) {}
GMOCK_METHOD5_(, noexcept, ,
connect,
......
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