Permalink
Browse files

Fix OnClientDisconnect() hook of network modules.

It wasn't called for them.
  • Loading branch information...
1 parent c5578f8 commit 2dcb3efcc37c499c01d8fafe1bce985bc39449bf Alexey Sokolov committed Sep 24, 2011
Showing with 2 additions and 2 deletions.
  1. +2 −2 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);
}
}

0 comments on commit 2dcb3ef

Please sign in to comment.