mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
thread_sleep: ignore signal interruption
This commit is contained in:
parent
958778b441
commit
ea6b741eb8
|
@ -758,7 +758,8 @@ void thread_sleep(int microseconds)
|
|||
{
|
||||
#if defined(CONF_FAMILY_UNIX)
|
||||
int result = usleep(microseconds);
|
||||
if(result == -1)
|
||||
/* ignore signal interruption */
|
||||
if(result == -1 && errno != EINTR)
|
||||
dbg_msg("thread", "sleep failed: %d", errno);
|
||||
#elif defined(CONF_FAMILY_WINDOWS)
|
||||
Sleep(microseconds/1000);
|
||||
|
|
Loading…
Reference in a new issue