summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrey Nazarov <skuller@skuller.net>2010-05-31 13:17:39 +0000
committerAndrey Nazarov <skuller@skuller.net>2010-05-31 13:17:39 +0000
commitb7564c99ac6fee2de731fc157a48ad9c417e0507 (patch)
tree8fc2e738b696d427fb8ff2f97b781a13b1adf755
parent84096cf2873d720cbf4af6f2a6f655cb3e6fd310 (diff)
Set last_sent at netchan creation time to prevent server from sending a useless packet just after client_connect.
-rw-r--r--source/net_chan.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/source/net_chan.c b/source/net_chan.c
index 8375a58..9c9d043 100644
--- a/source/net_chan.c
+++ b/source/net_chan.c
@@ -402,6 +402,7 @@ static netchan_t *NetchanOld_Setup( netsrc_t sock, const netadr_t *adr,
netchan->qport = qport;
netchan->maxpacketlen = maxpacketlen;
netchan->last_received = com_localTime;
+ netchan->last_sent = com_localTime;
netchan->incoming_sequence = 0;
netchan->outgoing_sequence = 1;
@@ -799,6 +800,7 @@ static netchan_t *NetchanNew_Setup( netsrc_t sock, const netadr_t *adr,
netchan->qport = qport;
netchan->maxpacketlen = maxpacketlen;
netchan->last_received = com_localTime;
+ netchan->last_sent = com_localTime;
netchan->incoming_sequence = 0;
netchan->outgoing_sequence = 1;