Skip to content

Commit

Permalink
protocol: fix pthread_cond_wait usage
Browse files Browse the repository at this point in the history
  • Loading branch information
tsl0922 committed Sep 9, 2018
1 parent 8e09061 commit b6d160a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/protocol.c
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ thread_run_command(void *args) {
if (FD_ISSET (pty, &des_set)) {
while (client->running) {
pthread_mutex_lock(&client->mutex);
if (client->state == STATE_READY) {
while (client->state == STATE_READY) {
pthread_cond_wait(&client->cond, &client->mutex);
}
memset(client->pty_buffer, 0, sizeof(client->pty_buffer));
Expand Down

0 comments on commit b6d160a

Please sign in to comment.