diff --git a/deltachat-ffi/src/lib.rs b/deltachat-ffi/src/lib.rs index 0c4949d30..7dfa6b6bb 100644 --- a/deltachat-ffi/src/lib.rs +++ b/deltachat-ffi/src/lib.rs @@ -654,9 +654,7 @@ pub unsafe extern "C" fn dc_context_shutdown(context: *mut dc_context_t) { let ffi_context = &*context; with_inner_async!(ffi_context, ctx, async move { - eprintln!("SHUTDOWN"); ctx.stop().await; - eprintln!("SHUTDOWN:DONE") }) .unwrap_or(()) } diff --git a/python/src/deltachat/account.py b/python/src/deltachat/account.py index 915ef0dae..51003ac2e 100644 --- a/python/src/deltachat/account.py +++ b/python/src/deltachat/account.py @@ -575,6 +575,7 @@ class Account(object): if not self.get_config("addr") or not self.get_config("mail_pw"): raise MissingCredentials("addr or mail_pwd not set in config") lib.dc_configure(self._dc_context) + lib.dc_context_run(self._dc_context) def wait_shutdown(self): """ wait until shutdown of this account has completed. """ @@ -590,6 +591,7 @@ class Account(object): if self._threads.is_started(): self.stop_ongoing() self._threads.stop(wait=False) + lib.dc_context_shutdown(dc_context) lib.dc_close(dc_context) self._threads.stop(wait=wait) # to wait for threads self._dc_context = None diff --git a/python/src/deltachat/iothreads.py b/python/src/deltachat/iothreads.py index 901b6af7a..f4cc88faf 100644 --- a/python/src/deltachat/iothreads.py +++ b/python/src/deltachat/iothreads.py @@ -54,7 +54,6 @@ class IOThreads: ev = next(it) except StopIteration: break - print("{}", ev) self.account.ac_log_line("calling hook name={} kwargs={}".format(ev.name, ev.kwargs)) ev.call_hook()