if (host_client->netconnection)
{
- // free the client (the body stays around)
+ // tell the client to be gone
if (!crash)
{
// LordHavoc: no opportunity for resending, so use unreliable 3 times
NetConn_SendUnreliableMessage(host_client->netconnection, &buf, sv.protocol, 10000, false);
NetConn_SendUnreliableMessage(host_client->netconnection, &buf, sv.protocol, 10000, false);
}
- // break the net connection
- NetConn_Close(host_client->netconnection);
- host_client->netconnection = NULL;
}
// call qc ClientDisconnect function
prog->globals.server->self = saveSelf;
}
+ if (host_client->netconnection)
+ {
+ // break the net connection
+ NetConn_Close(host_client->netconnection);
+ host_client->netconnection = NULL;
+ }
+
// if a download is active, close it
if (host_client->download_file)
{