mirror of
https://github.com/deltachat/deltachat-core.git
synced 2025-10-05 10:39:27 +02:00
make sure subsequent idle-stops are executed only once
This commit is contained in:
parent
673f809691
commit
e5c862c54d
1 changed files with 2 additions and 1 deletions
|
@ -132,6 +132,7 @@ static void* idle_thread_entry_point(void* entry_arg)
|
|||
{
|
||||
mrmailbox_t* mailbox = (mrmailbox_t*)entry_arg;
|
||||
mrmailbox_idle(mailbox); // this may take hours ...
|
||||
idle_thread_started = 0;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
@ -150,9 +151,9 @@ static void idle_disconnect(mrmailbox_t* mailbox)
|
|||
{
|
||||
if( idle_thread_started )
|
||||
{
|
||||
idle_thread_started = 0;
|
||||
mrmailbox_interrupt_idle(mailbox);
|
||||
pthread_join(idle_thread, NULL);
|
||||
idle_thread_started = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue