mirror of
https://github.com/deltachat/deltachat-core.git
synced 2025-10-05 19:42:04 +02:00
protect fake-idle against spurious wakeups
This commit is contained in:
parent
ff5c0a4eae
commit
3d98d98e55
1 changed files with 1 additions and 1 deletions
|
@ -956,7 +956,7 @@ void mrimap_watch_n_wait(mrimap_t* imap)
|
|||
mrmailbox_log_info(imap->m_mailbox, 0, "IMAP-watch-thread waits %i seconds.", (int)seconds_to_wait);
|
||||
pthread_mutex_lock(&imap->m_watch_condmutex);
|
||||
|
||||
if( imap->m_watch_condflag == 0 ) {
|
||||
while( imap->m_watch_condflag == 0 ) {
|
||||
struct timespec timeToWait;
|
||||
timeToWait.tv_sec = time(NULL)+seconds_to_wait;
|
||||
timeToWait.tv_nsec = 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue