shithub: choc

Download patch

ref: e7e6a33e7d6b196621a6b9bc29f56c5475323d88
parent: 214432eebbb94f41db0d9397aa4e098d4dfb3f7b
author: Simon Howard <[email protected]>
date: Tue May 29 17:12:44 EDT 2018

net: Set keepalive_recv_time on connection setup.

If the keepalive last-receive time is not initialized when the
connection is established, there is a risk that the connection will
immediately time out. This was causing problems for some players
where clients were successfully connecting to servers only to find
themselves stuck in the pre-game "lobby" area with no information
about other players.

This fixes #1046. Thanks to @bradc6 for the bug report.

--- a/src/net_client.c
+++ b/src/net_client.c
@@ -449,6 +449,8 @@
     client_connection.state = NET_CONN_STATE_CONNECTED;
     client_connection.protocol = protocol;
 
+    printf("CL: successful connection to server\n");
+
     // Even though we have negotiated a compatible protocol, the game may still
     // desync. Chocolate Doom's philosophy makes this unlikely, but if we're
     // playing with a forked version, or even against a different version that