[input] always unlock on pthread_cond_wait() error #2837

This commit is contained in:
nick black 2025-01-23 14:59:39 -05:00
parent 73e834438f
commit 333455e792
No known key found for this signature in database
GPG Key ID: 5F43400C21CBFACC

View File

@ -2709,12 +2709,11 @@ internal_get(inputctx* ictx, const struct timespec* ts, ncinput* ni){
if(r){
pthread_mutex_unlock(&ictx->ilock);
if(r == ETIMEDOUT){
pthread_mutex_unlock(&ictx->ilock);
if(ni){
memset(ni, 0, sizeof(*ni));
}
return 0;
}else if(r < 0){
}else{
inc_input_errors(ictx);
if(ni){
memset(ni, 0, sizeof(*ni));