Don't try to quit multiple times (#1392)

Calls to CIRCSock::Quit() eventually result in the object's destructor
being called, which itself calls CIRCSock::Quit() again. Avoid sending
multiple quit messages to the remote server by checking if the
underlying socket is already marked for closing.
This commit is contained in:
Eli Young
2017-04-05 18:15:17 -07:00
committed by Alexey Sokolov
parent aefc97d09a
commit 20b635aad7
+3
View File
@@ -137,6 +137,9 @@ CIRCSock::~CIRCSock() {
}
void CIRCSock::Quit(const CString& sQuitMsg) {
if (IsClosed()) {
return;
}
if (!m_bAuthed) {
Close(CLT_NOW);
return;