Skip to content

Commit 2888353

Browse files
committed
[notcurses] unlock
1 parent 3f74277 commit 2888353

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

  • src/third-party/notcurses/src/lib

src/third-party/notcurses/src/lib/in.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3088,17 +3088,18 @@ struct initial_responses* inputlayer_get_responses(inputctx* ictx){
30883088
struct timespec ts = {wait_start_tv.tv_sec + 5, 0};
30893089
pthread_mutex_lock(&ictx->ilock);
30903090
while(ictx->initdata || !ictx->initdata_complete){
3091-
pthread_cond_timedwait(&ictx->icond, &ictx->ilock, &ts);
3091+
pthread_cond_timedwait(&ictx->icond, &ictx->ilock, &ts);
30923092
gettimeofday(&curr_tv, NULL);
30933093
timersub(&curr_tv, &wait_start_tv, &diff_tv);
30943094
if (diff_tv.tv_sec > 5) {
30953095
logpanic("timedout waiting for initial response");
3096+
pthread_mutex_unlock(&ictx->ilock);
30963097
return NULL;
30973098
}
30983099
}
30993100
iresp = ictx->initdata_complete;
31003101
ictx->initdata_complete = NULL;
3101-
loginfo("inputlayer_get_resp got %p", iresp);
3102+
loginfo("inputlayer_get_resp got %p", iresp);
31023103
pthread_mutex_unlock(&ictx->ilock);
31033104
if(ictx->failed){
31043105
logpanic("aborting after automaton construction failure");

0 commit comments

Comments
 (0)