mirror of
https://github.com/znc/znc.git
synced 2026-05-09 06:44:40 +02:00
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:
committed by
Alexey Sokolov
parent
aefc97d09a
commit
20b635aad7
@@ -137,6 +137,9 @@ CIRCSock::~CIRCSock() {
|
||||
}
|
||||
|
||||
void CIRCSock::Quit(const CString& sQuitMsg) {
|
||||
if (IsClosed()) {
|
||||
return;
|
||||
}
|
||||
if (!m_bAuthed) {
|
||||
Close(CLT_NOW);
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user