mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-14 12:08:20 +00:00
fixed that the server will crash if a client is dropped due to timeout
This commit is contained in:
parent
ddfcd38ef4
commit
78151cf423
|
@ -126,8 +126,11 @@ static void conn_reset(NETCONNECTION *conn)
|
||||||
conn->ack = 0;
|
conn->ack = 0;
|
||||||
//dbg_msg("connection", "state = %d->%d", conn->state, NETWORK_CONNSTATE_OFFLINE);
|
//dbg_msg("connection", "state = %d->%d", conn->state, NETWORK_CONNSTATE_OFFLINE);
|
||||||
|
|
||||||
if(conn->state == NETWORK_CONNSTATE_ONLINE)
|
if(conn->state == NETWORK_CONNSTATE_ONLINE ||
|
||||||
|
conn->state == NETWORK_CONNSTATE_ERROR)
|
||||||
|
{
|
||||||
conn->disconnected++;
|
conn->disconnected++;
|
||||||
|
}
|
||||||
|
|
||||||
conn->state = NETWORK_CONNSTATE_OFFLINE;
|
conn->state = NETWORK_CONNSTATE_OFFLINE;
|
||||||
conn->error_string = 0;
|
conn->error_string = 0;
|
||||||
|
|
Loading…
Reference in a new issue