From eff4644a00dac86be3a7e32c917eba65c985142f Mon Sep 17 00:00:00 2001 From: Michael Jumper Date: Sat, 22 Nov 2014 17:21:16 -0800 Subject: [PATCH] GUAC-888: Init socket last_write_timestamp during alloc, otherwise keep-alive math fails until data has been written, which may result in the keep-alive never being sent. --- src/libguac/socket.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/libguac/socket.c b/src/libguac/socket.c index e6f77929..bdd2ff4d 100644 --- a/src/libguac/socket.c +++ b/src/libguac/socket.c @@ -152,6 +152,7 @@ guac_socket* guac_socket_alloc() { socket->__written = 0; socket->data = NULL; socket->state = GUAC_SOCKET_OPEN; + socket->last_write_timestamp = guac_timestamp_current(); /* Init members */ socket->__instructionbuf_unparsed_start = socket->__instructionbuf;