foxygit / doom Log in
commit e7e6a33e7d6b196621a6b9bc29f56c5475323d88
Author:     Simon Howard <fraggle@soulsphere.org>
AuthorDate: Tue May 29 21:12:44 2018 -0400
Commit:     Simon Howard <fraggle@soulsphere.org>
CommitDate: Tue May 29 21:12:44 2018 -0400

    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.
---
 src/net_client.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/net_client.c b/src/net_client.c
index 11615c08..3bcf2eb5 100644
--- a/src/net_client.c
+++ b/src/net_client.c
@@ -449,6 +449,8 @@ static void NET_CL_ParseSYN(net_packet_t *packet)
     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