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.

This commit is contained in:
Michael Jumper 2014-11-22 17:21:16 -08:00
parent 4cbb4001fc
commit eff4644a00

View File

@ -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;