Merge pull request #94 from glyptodon/keep-alive-init

GUAC-1374: socket->__keep_alive_enabled MUST be initialized
This commit is contained in:
James Muehlner 2015-10-19 11:58:47 -07:00
commit 64f47dada0

View File

@ -161,6 +161,9 @@ guac_socket* guac_socket_alloc() {
/* Default to unsafe threading */ /* Default to unsafe threading */
socket->__threadsafe_instructions = 0; socket->__threadsafe_instructions = 0;
/* No keep alive ping by default */
socket->__keep_alive_enabled = 0;
pthread_mutexattr_init(&lock_attributes); pthread_mutexattr_init(&lock_attributes);
pthread_mutexattr_setpshared(&lock_attributes, PTHREAD_PROCESS_SHARED); pthread_mutexattr_setpshared(&lock_attributes, PTHREAD_PROCESS_SHARED);