mirror of
https://github.com/GOSTSec/sgminer
synced 2025-01-11 07:17:58 +00:00
Give correct return code in cgsem_mswait
This commit is contained in:
parent
1d9f90b256
commit
c9c39ac14d
7
util.c
7
util.c
@ -2472,9 +2472,12 @@ int _cgsem_mswait(cgsem_t *cgsem, int ms, const char *file, const char *func, co
|
||||
timeraddspec(&abs_timeout, &ts_now);
|
||||
ret = sem_timedwait(cgsem, &abs_timeout);
|
||||
|
||||
if (unlikely(ret && !sock_timeout()))
|
||||
if (ret) {
|
||||
if (likely(sock_timeout()))
|
||||
return ETIMEDOUT;
|
||||
quitfrom(1, file, func, line, "Failed to sem_timedwait errno=%d cgsem=0x%p", errno, cgsem);
|
||||
return ret;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
void _cgsem_destroy(cgsem_t *cgsem)
|
||||
|
Loading…
Reference in New Issue
Block a user