Commit 0c267afc authored by Orvid King's avatar Orvid King Committed by Facebook Github Bot

AsyncSSLSocket::newSocket fd to NetworkSocket overload

Summary: So that the fd overload can be removed.

Reviewed By: yfeldblum

Differential Revision: D13628683

fbshipit-source-id: 5201d3ef351042ebaf2d30c3987b931f8d13d336
parent 6f276e25
......@@ -259,16 +259,6 @@ class AsyncSSLSocket : public virtual AsyncSocket {
Destructor());
}
static std::shared_ptr<AsyncSSLSocket> newSocket(
const std::shared_ptr<folly::SSLContext>& ctx,
EventBase* evb,
int fd,
bool server = true,
bool deferSecurityNegotiation = false) {
return newSocket(
ctx, evb, NetworkSocket::fromFd(fd), server, deferSecurityNegotiation);
}
/**
* Helper function to create a client shared_ptr<AsyncSSLSocket>.
*/
......
......@@ -70,7 +70,8 @@ class SSLServerAcceptCallbackBase : public AsyncServerSocket::AcceptCallback {
try {
// Create a AsyncSSLSocket object with the fd. The socket should be
// added to the event base and in the state of accepting SSL connection.
socket_ = AsyncSSLSocket::newSocket(ctx_, base_, fd);
socket_ = AsyncSSLSocket::newSocket(
ctx_, base_, folly::NetworkSocket::fromFd(fd));
} catch (const std::exception& e) {
LOG(ERROR) << "Exception %s caught while creating a AsyncSSLSocket "
"object with socket "
......
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