| 165 | |
| 166 | |
| 167 | void CServerConnect::StopConnectionTry() |
| 168 | { |
| 169 | connectionattemps.clear(); |
| 170 | connecting = false; |
| 171 | singleconnecting = false; |
| 172 | |
| 173 | if (m_idRetryTimer.IsRunning()) |
| 174 | { |
| 175 | m_idRetryTimer.Stop(); |
| 176 | } |
| 177 | |
| 178 | // close all currently opened sockets except the one which is connected to our current server |
| 179 | for(SocketsList::iterator it = m_lstOpenSockets.begin(); it != m_lstOpenSockets.end(); ) { |
| 180 | CServerSocket *pSck = *it++; |
| 181 | if (pSck == connectedsocket) // don't destroy socket which is connected to server |
| 182 | continue; |
| 183 | if (pSck->m_bIsDeleting == false) // don't destroy socket if it is going to destroy itself later on |
| 184 | DestroySocket(pSck); |
| 185 | } |
| 186 | } |
| 187 | |
| 188 | void CServerConnect::ConnectionEstablished(CServerSocket* sender) |
| 189 | { |
no test coverage detected