diff options
author | Mike Buland <eichlan@xagasoft.com> | 2008-02-07 14:59:11 +0000 |
---|---|---|
committer | Mike Buland <eichlan@xagasoft.com> | 2008-02-07 14:59:11 +0000 |
commit | 5574841cc88412854b2cb94253152b3606803e2a (patch) | |
tree | 444381af56492c049e00b9b717a225333de614a5 /src/itoserver.cpp | |
parent | 3e581ae682dc6050b8b8c41c917ae62a040719d8 (diff) | |
download | libbu++-5574841cc88412854b2cb94253152b3606803e2a.tar.gz libbu++-5574841cc88412854b2cb94253152b3606803e2a.tar.bz2 libbu++-5574841cc88412854b2cb94253152b3606803e2a.tar.xz libbu++-5574841cc88412854b2cb94253152b3606803e2a.zip |
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...
Diffstat (limited to '')
-rw-r--r-- | src/itoserver.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
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 ) | |||
64 | { | 64 | { |
65 | ItoClient *pC = new ItoClient( *this, nSocket, nPort, nTimeoutSec, | 65 | ItoClient *pC = new ItoClient( *this, nSocket, nPort, nTimeoutSec, |
66 | nTimeoutUSec ); | 66 | nTimeoutUSec ); |
67 | pC->start(); | ||
68 | 67 | ||
69 | imClients.lock(); | 68 | imClients.lock(); |
70 | hClients.insert( nSocket, pC ); | 69 | hClients.insert( nSocket, pC ); |
71 | imClients.unlock(); | 70 | imClients.unlock(); |
71 | |||
72 | pC->start(); | ||
72 | } | 73 | } |
73 | 74 | ||
74 | void *Bu::ItoServer::run() | 75 | void *Bu::ItoServer::run() |