Skip to content

Commit

Permalink
#5628 Initialize SSL on secure client sockets
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew Nelless committed Sep 29, 2016
1 parent d988fe6 commit 539fba9
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/lib/net/TCPSocketFactory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,15 +43,14 @@ TCPSocketFactory::~TCPSocketFactory()
IDataSocket*
TCPSocketFactory::create(bool secure) const
{
IDataSocket* socket = NULL;
if (secure) {
socket = new SecureSocket(m_events, m_socketMultiplexer);
SecureSocket* secureSocket = new SecureSocket(m_events, m_socketMultiplexer);
secureSocket->initSsl (false);
return secureSocket;
}
else {
socket = new TCPSocket(m_events, m_socketMultiplexer);
return new TCPSocket(m_events, m_socketMultiplexer);
}

return socket;
}

IListenSocket*
Expand Down

0 comments on commit 539fba9

Please sign in to comment.