diff --git a/protocols/rdp/src/guac_handlers.c b/protocols/rdp/src/guac_handlers.c index e72ac343..3880b5a9 100644 --- a/protocols/rdp/src/guac_handlers.c +++ b/protocols/rdp/src/guac_handlers.c @@ -168,6 +168,8 @@ int rdp_guac_client_handle_messages(guac_client* client) { } } + pthread_mutex_lock(&(guac_client_data->rdp_lock)); + /* Check the libfreerdp fds */ if (!freerdp_check_fds(rdp_inst)) { guac_error = GUAC_STATUS_BAD_STATE; @@ -201,6 +203,8 @@ int rdp_guac_client_handle_messages(guac_client* client) { return 1; } + pthread_mutex_unlock(&(guac_client_data->rdp_lock)); + /* Flush any audio */ if (guac_client_data->audio != NULL) { pthread_mutex_lock(&(guac_client_data->update_lock));