diff --git a/docs b/docs index a17ccba8..1060a5b4 160000 --- a/docs +++ b/docs @@ -1 +1 @@ -Subproject commit a17ccba895f5e980947264f929611e157aa7c35c +Subproject commit 1060a5b402e5d1c74e2812fa85fc8b90ee174e02 diff --git a/src/danog/MadelineProto/API.php b/src/danog/MadelineProto/API.php index 2e76c7ea..26939cd7 100644 --- a/src/danog/MadelineProto/API.php +++ b/src/danog/MadelineProto/API.php @@ -176,10 +176,10 @@ class API extends InternalDoc $this->logger->logger('Shutting down MadelineProto (API)'); if ($this->API) { $this->API->destructing = true; + $this->API->unreference(); } $this->destructing = true; Tools::wait($this->wrapper->serialize(), true); - $this->API->unreference(); } else { $this->logger->logger('Shutting down MadelineProto (old deserialized instance of API)'); }