Fixed server crash caused by double delete a socket #4535

This commit is contained in:
XinyuHou 2015-04-16 11:55:05 +01:00
parent 7c6561b3da
commit 7ab1081b3f
1 changed files with 2 additions and 1 deletions

View File

@ -55,7 +55,6 @@ SecureListenSocket::accept()
m_socketMultiplexer, m_socketMultiplexer,
ARCH->acceptSocket(m_socket, NULL)); ARCH->acceptSocket(m_socket, NULL));
socket->initSsl(true); socket->initSsl(true);
m_secureSocketSet.insert(socket);
if (socket != NULL) { if (socket != NULL) {
setListeningJob(); setListeningJob();
@ -78,6 +77,8 @@ SecureListenSocket::accept()
socket->secureAccept(); socket->secureAccept();
m_secureSocketSet.insert(socket);
return dynamic_cast<IDataSocket*>(socket); return dynamic_cast<IDataSocket*>(socket);
} }
catch (XArchNetwork&) { catch (XArchNetwork&) {