mirror of
https://github.com/tsl0922/ttyd.git
synced 2026-01-22 02:34:23 +01:00
protocol: replace sleep with pthread cond
This commit is contained in:
@@ -475,6 +475,8 @@ main(int argc, char **argv) {
|
||||
pthread_mutex_lock(&client->mutex);
|
||||
if (client->state != STATE_DONE)
|
||||
lws_callback_on_writable(client->wsi);
|
||||
else
|
||||
pthread_cond_signal(&client->cond);
|
||||
pthread_mutex_unlock(&client->mutex);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user