Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix OnClientDisconnect() hook of network modules.

It wasn't called for them.
  • Loading branch information...
commit 2dcb3efcc37c499c01d8fafe1bce985bc39449bf 1 parent c5578f8
Alexey Sokolov authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 Client.cpp
4 Client.cpp
View
@@ -189,7 +189,6 @@ void CClient::ReadLine(const CString& sData) {
// Block PONGs, we already responded to the pings
return;
} else if (sCommand.Equals("QUIT")) {
- SetNetwork(NULL, true, false);
Close(Csock::CLT_AFTERWRITE); // Treat a client quit as a detach
return; // Don't forward this msg. We don't want the client getting us disconnected.
} else if (sCommand.Equals("PROTOCTL")) {
@@ -657,10 +656,11 @@ void CClient::ConnectionRefused() {
void CClient::Disconnected() {
DEBUG(GetSockName() << " == Disconnected()");
+ CIRCNetwork* pNetwork = m_pNetwork;
SetNetwork(NULL, true, false);
if (m_pUser) {
- NETWORKMODULECALL(OnClientDisconnect(), m_pUser, m_pNetwork, this, NOTHING);
+ NETWORKMODULECALL(OnClientDisconnect(), m_pUser, pNetwork, this, NOTHING);
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.