| 133 | } |
| 134 | |
| 135 | NetworkRecvStatus QueryNetworkGameSocketHandler::Receive_SERVER_ERROR(Packet &p) |
| 136 | { |
| 137 | NetworkErrorCode error = (NetworkErrorCode)p.Recv_uint8(); |
| 138 | |
| 139 | Debug(net, 9, "Query::Receive_SERVER_ERROR(): error={}", error); |
| 140 | |
| 141 | NetworkGame *item = NetworkGameListAddItem(this->connection_string); |
| 142 | |
| 143 | if (error == NETWORK_ERROR_NOT_EXPECTED) { |
| 144 | /* If we query a server that is 1.11.1 or older, we get an |
| 145 | * NETWORK_ERROR_NOT_EXPECTED on requesting the game info. Show to the |
| 146 | * user this server is too old to query. |
| 147 | */ |
| 148 | item->status = NGLS_TOO_OLD; |
| 149 | } else { |
| 150 | item->status = NGLS_OFFLINE; |
| 151 | } |
| 152 | item->refreshing = false; |
| 153 | |
| 154 | UpdateNetworkGameWindow(); |
| 155 | |
| 156 | return NETWORK_RECV_STATUS_CLOSE_QUERY; |
| 157 | } |
| 158 | |
| 159 | /** |
| 160 | * Check if any query needs to send or receive. |
nothing calls this directly
no test coverage detected