Skip to content

Commit 1f26ae6

Browse files
committed
session server BUGFIX redundant lock
Fixes #573
1 parent 2616e72 commit 1f26ae6

1 file changed

Lines changed: 1 addition & 6 deletions

File tree

src/session_server.c

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3532,13 +3532,8 @@ nc_ch_client_thread(void *arg)
35323532

35333533
unlock_skip:
35343534
free(data->client_name);
3535-
if (nc_mutex_lock(&data->cond_lock, NC_CH_COND_LOCK_TIMEOUT, __func__) != 1) {
3536-
pthread_cond_destroy(&data->cond);
3537-
nc_mutex_unlock(&data->cond_lock, __func__);
3538-
} else {
3539-
pthread_cond_destroy(&data->cond);
3540-
}
35413535
pthread_mutex_destroy(&data->cond_lock);
3536+
pthread_cond_destroy(&data->cond);
35423537
free(data);
35433538
return NULL;
35443539
}

0 commit comments

Comments
 (0)