1
0
mirror of https://github.com/danog/MadelineProto.git synced 2025-01-23 05:51:14 +01:00

Add onStop method

This commit is contained in:
amir 2023-10-01 20:58:46 +03:30
parent 8bac02e925
commit 1ca83568cf

View File

@ -149,6 +149,9 @@ abstract class EventHandler extends AbstractAPI
$r = $r->await();
}
}
if (\method_exists($this, 'onStop')) {
Shutdown::addCallback([$this, 'onStop']);
}
if ($main) {
$this->setReportPeers($this->getReportPeers());
}