1
0
Fork 0
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:
B. Petersen 2018-06-12 23:46:54 +02:00
parent ff5c0a4eae
commit 3d98d98e55

View file

@ -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;