check correct running flag in scheduler stop

This commit is contained in:
dignifiedquire
2020-05-21 15:50:56 +02:00
parent 7b10ec26a3
commit 69f095687d

View File

@@ -607,7 +607,7 @@ class Account(object):
self.log("stop_ongoing")
self.stop_ongoing()
if self.is_started():
if bool(lib.dc_is_running(self._dc_context)):
self.log("context_shutdown (stop core scheduler)")
lib.dc_context_shutdown(self._dc_context)
else: