From 55a2d1231fe86e7e856ac6da5462e3c5293d173a Mon Sep 17 00:00:00 2001 From: Andrew Nelless Date: Wed, 28 Sep 2016 11:24:33 +0100 Subject: [PATCH] #5628 Initialize SSL on secure client sockets --- src/lib/net/TCPSocketFactory.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/lib/net/TCPSocketFactory.cpp b/src/lib/net/TCPSocketFactory.cpp index 87d4caa3..e205a9fa 100644 --- a/src/lib/net/TCPSocketFactory.cpp +++ b/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*