From 5574841cc88412854b2cb94253152b3606803e2a Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Thu, 7 Feb 2008 14:59:11 +0000 Subject: Corrected a very rare race condition in Bu::ItoServer where there was a chance that the client would disconnect so quickly that it would be cleaned up before it was properly accounted for. I apparently added something to MiniMacro a while ago...probably the end tags I think... --- src/itoserver.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/itoserver.cpp') diff --git a/src/itoserver.cpp b/src/itoserver.cpp index 8bdd894..7426e8a 100644 --- a/src/itoserver.cpp +++ b/src/itoserver.cpp @@ -64,11 +64,12 @@ void Bu::ItoServer::addClient( int nSocket, int nPort ) { ItoClient *pC = new ItoClient( *this, nSocket, nPort, nTimeoutSec, nTimeoutUSec ); - pC->start(); imClients.lock(); hClients.insert( nSocket, pC ); imClients.unlock(); + + pC->start(); } void *Bu::ItoServer::run() -- cgit v1.2.3