| 18 | std::vector<std::unique_ptr<QueryNetworkGameSocketHandler>> QueryNetworkGameSocketHandler::queries = {}; |
| 19 | |
| 20 | NetworkRecvStatus QueryNetworkGameSocketHandler::CloseConnection(NetworkRecvStatus status) |
| 21 | { |
| 22 | assert(status != NETWORK_RECV_STATUS_OKAY); |
| 23 | assert(this->sock != INVALID_SOCKET); |
| 24 | |
| 25 | /* Connection is closed, but we never received a packet. Must be offline. */ |
| 26 | NetworkGame *item = NetworkGameListAddItem(this->connection_string); |
| 27 | if (item->refreshing) { |
| 28 | item->status = NGLS_OFFLINE; |
| 29 | item->refreshing = false; |
| 30 | |
| 31 | UpdateNetworkGameWindow(); |
| 32 | } |
| 33 | |
| 34 | return status; |
| 35 | } |
| 36 | |
| 37 | /** |
| 38 | * Check the connection's state, i.e. is the connection still up? |
no test coverage detected