From: <sv...@ww...> - 2004-12-31 20:47:40
|
Author: mkrose Date: 2004-12-31 12:47:29 -0800 (Fri, 31 Dec 2004) New Revision: 1422 Modified: trunk/CSP/SimNet/NetworkInterface.cpp Log: Prevent a spurious assertion when clients disconnect from the server. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1422 Modified: trunk/CSP/SimNet/NetworkInterface.cpp =================================================================== --- trunk/CSP/SimNet/NetworkInterface.cpp 2004-12-30 11:22:13 UTC (rev 1421) +++ trunk/CSP/SimNet/NetworkInterface.cpp 2004-12-31 20:47:29 UTC (rev 1422) @@ -270,7 +270,10 @@ } void NetworkInterface::disconnectPeer(PeerId id) { - removePeer(id); + PeerInfo *peer = getPeer(id); + if (peer && peer->isActive()) { + removePeer(id); + } } void NetworkInterface::processOutgoing(double timeout) { |