This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

#5628 Initialize SSL on secure client sockets

  • Loading branch information...
nlyan committed Sep 28, 2016
1 parent 0d84e4e commit 55a2d1231fe86e7e856ac6da5462e3c5293d173a
Showing with 4 additions and 5 deletions.
  1. +4 −5 src/lib/net/TCPSocketFactory.cpp
@@ -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*

0 comments on commit 55a2d12

Please sign in to comment.