From: havoc Date: Sun, 15 May 2005 18:57:04 +0000 (+0000) Subject: disabled some of the server client connect code that may be causing problems X-Git-Tag: xonotic-v0.1.0preview~4880 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=f6a17e5dc2a9a9003aa606badd41de98cc24d5bc;p=xonotic%2Fdarkplaces.git disabled some of the server client connect code that may be causing problems git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@5301 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/netconn.c b/netconn.c index 09aadd57..afd1b0e0 100755 --- a/netconn.c +++ b/netconn.c @@ -1228,6 +1228,7 @@ static void NetConn_BuildChallengeString(char *buffer, int bufferlength) buffer[i] = 0; } +extern void SV_SendServerinfo (client_t *client); int NetConn_ServerParsePacket(lhnetsocket_t *mysocket, qbyte *data, int length, lhnetaddress_t *peeraddress) { int i, n, ret, clientnum, responselength, best; @@ -1303,24 +1304,28 @@ int NetConn_ServerParsePacket(lhnetsocket_t *mysocket, qbyte *data, int length, for (clientnum = 0, client = svs.clients;clientnum < svs.maxclients;clientnum++, client++) if (client->netconnection && LHNETADDRESS_Compare(peeraddress, &client->netconnection->peeraddress) == 0) break; - if (clientnum < svs.maxclients) + if (clientnum < svs.maxclients && realtime - client->connecttime < net_messagerejointimeout.value) + { + // client is still trying to connect, + // so we send a duplicate reply + if (developer.integer) + Con_Printf("Datagram_ParseConnectionless: sending duplicate accept to %s.\n", addressstring2); + NetConn_WriteString(mysocket, "\377\377\377\377accept", peeraddress); + } +#if 0 + else if (clientnum < svs.maxclients) { - // duplicate connection request - if (realtime - client->connecttime < 2.0) - { - // client is still trying to connect, - // so we send a duplicate reply - if (developer.integer) - Con_Printf("Datagram_ParseConnectionless: sending duplicate accept to %s.\n", addressstring2); - NetConn_WriteString(mysocket, "\377\377\377\377accept", peeraddress); - } - // only kick if old connection seems dead if (realtime - client->netconnection->lastMessageTime >= net_messagerejointimeout.value) { - // kick off connection and await retry - client->deadsocket = true; + // client crashed and is coming back, keep their stuff intact + SV_SendServerinfo(client); + //host_client = client; + //SV_DropClient (true); + //client->deadsocket = true; } + // else ignore them } +#endif else { // this is a new client, find a slot