#5628 Initialize SSL on secure client sockets

This commit is contained in:
Andrew Nelless 2016-09-28 11:24:33 +01:00
parent 0d84e4eed6
commit 55a2d1231f
1 changed files with 4 additions and 5 deletions

View File

@ -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*