From: havoc Date: Tue, 24 Jun 2003 15:10:58 +0000 (+0000) Subject: ReceivedMessage now sets lastMessageTime when a valid message or ack is received... X-Git-Tag: xonotic-v0.1.0preview~6584 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=e19743d61648e241262050fcc0143e73b231b9f1;p=xonotic%2Fdarkplaces.git ReceivedMessage now sets lastMessageTime when a valid message or ack is received, this fixes the timeout problems (yes, all of them) git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@3102 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/netconn.c b/netconn.c index 439aa7ce..5dcc8de1 100755 --- a/netconn.c +++ b/netconn.c @@ -443,6 +443,7 @@ int NetConn_ReceivedMessage(netconn_t *conn, qbyte *data, int length) Con_DPrintf("Dropped %u datagram(s)\n", count); } conn->unreliableReceiveSequence = sequence + 1; + conn->lastMessageTime = realtime; unreliableMessagesReceived++; SZ_Clear(&net_message); SZ_Write(&net_message, data, length); @@ -462,6 +463,7 @@ int NetConn_ReceivedMessage(netconn_t *conn, qbyte *data, int length) conn->ackSequence++; if (conn->ackSequence != conn->sendSequence) Con_DPrintf("ack sequencing error\n"); + conn->lastMessageTime = realtime; conn->sendMessageLength -= MAX_DATAGRAM; if (conn->sendMessageLength > 0) { @@ -490,6 +492,7 @@ int NetConn_ReceivedMessage(netconn_t *conn, qbyte *data, int length) NetConn_Write(conn->mysocket, (qbyte *)temppacket, 8, &conn->peeraddress); if (sequence == conn->receiveSequence) { + conn->lastMessageTime = realtime; conn->receiveSequence++; memcpy(conn->receiveMessage + conn->receiveMessageLength, data, length); conn->receiveMessageLength += length;