1
0
mirror of https://github.com/danog/MadelineProto.git synced 2024-11-27 01:14:39 +01:00

Avoid restarting existing event handler

This commit is contained in:
Daniil Gentili 2021-04-07 17:11:01 +02:00
parent 90b03a2cfa
commit c4527bc72c
Signed by: danog
GPG Key ID: 8C1BE3B34B230CA7
2 changed files with 4 additions and 1 deletions

View File

@ -410,6 +410,9 @@ class API extends InternalDoc
$this->async(true);
if ($this->API instanceof Client) {
if (yield $this->API->hasEventHandler()) {
return;
}
yield $this->API->stopIpcServer();
yield $this->API->disconnect();
yield from $this->connectToMadelineProto(new SettingsEmpty, true);

View File

@ -169,7 +169,7 @@ runTest
pkill -f 'MadelineProto worker .*' || echo "No old process"
echo "Testing with new version (upgrade)..."
php tools/makephar.php $HOME/phar5 "madeline$php$branch.phar" $GITHUB_SHA
php tools/makephar.php $HOME/phar5 "madeline$php$branch.phar" "$GITHUB_SHA-$php"
export ACTIONS_PHAR="madeline$php$branch.phar"
runTestSimple
pkill -f 'MadelineProto worker .*' || echo "No old process"