GUACAMOLE-1416: Fix unreleased the lock in the ssh_client_thread

GUACAMOLE-1416: Fix unreleased the lock ssh_client->term_channel_lock in the ssh_client_thread.
This commit is contained in:
ycaibb 2021-09-10 20:44:46 +08:00
parent 12b8eac514
commit 329171a950

View File

@ -438,8 +438,10 @@ void* ssh_client_thread(void* data) {
/* Send keepalive at configured interval */ /* Send keepalive at configured interval */
if (settings->server_alive_interval > 0) { if (settings->server_alive_interval > 0) {
timeout = 0; timeout = 0;
if (libssh2_keepalive_send(ssh_client->session->session, &timeout) > 0) if (libssh2_keepalive_send(ssh_client->session->session, &timeout) > 0) {
pthread_mutex_unlock(&(ssh_client->term_channel_lock));
break; break;
}
timeout *= 1000; timeout *= 1000;
} }
/* If keepalive is not configured, sleep for the default of 1 second */ /* If keepalive is not configured, sleep for the default of 1 second */