mirror of
https://github.com/dankamongmen/notcurses
synced 2025-03-09 09:09:03 -04:00
[input] always unlock on pthread_cond_wait() error #2837
This commit is contained in:
parent
73e834438f
commit
333455e792
@ -2709,12 +2709,11 @@ internal_get(inputctx* ictx, const struct timespec* ts, ncinput* ni){
|
|||||||
if(r){
|
if(r){
|
||||||
pthread_mutex_unlock(&ictx->ilock);
|
pthread_mutex_unlock(&ictx->ilock);
|
||||||
if(r == ETIMEDOUT){
|
if(r == ETIMEDOUT){
|
||||||
pthread_mutex_unlock(&ictx->ilock);
|
|
||||||
if(ni){
|
if(ni){
|
||||||
memset(ni, 0, sizeof(*ni));
|
memset(ni, 0, sizeof(*ni));
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}else if(r < 0){
|
}else{
|
||||||
inc_input_errors(ictx);
|
inc_input_errors(ictx);
|
||||||
if(ni){
|
if(ni){
|
||||||
memset(ni, 0, sizeof(*ni));
|
memset(ni, 0, sizeof(*ni));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user