Rev 1124 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | SVN | RSS feed
| Rev 1124 | Rev 1402 | ||
|---|---|---|---|
| Line 141... | Line 141... | ||
| 141 | 141 | ||
| 142 | if (myClientSockets.find(id) != myClientSockets.end()) |
142 | if (myClientSockets.find(id) != myClientSockets.end()) |
| 143 | { |
143 | { |
| 144 | log.add(myName + " had client " + itos(id) + " disconnect!.\n"); |
144 | log.add(myName + " had client " + itos(id) + " disconnect!.\n"); |
| 145 | 145 | ||
| - | 146 | myClientSockets[id]->stop(); |
|
| - | 147 | ||
| 146 |
|
148 | AsyncSocket* socket = myClientSockets[id]; |
| 147 | myClientSockets.erase(id); |
149 | myClientSockets.erase(id); |
| - | 150 | ||
| - | 151 | delete socket; |
|
| 148 | } |
152 | } |
| 149 | } |
153 | } |
| 150 | 154 | ||
| 151 | void Server::handleEvent(int id, SocketEvent socketEvent) |
155 | void Server::handleEvent(int id, SocketEvent socketEvent) |
| 152 | { |
156 | { |