mirror of
https://github.com/danog/MadelineProto.git
synced 2025-01-23 00:51:12 +01:00
Make sure web runner is started
This commit is contained in:
parent
12e6efa9ce
commit
61e4d677ca
@ -7765,11 +7765,10 @@ class InternalDoc extends APIFactory
|
||||
/**
|
||||
* Unset event handler.
|
||||
*
|
||||
* @param bool $disableUpdateHandling Whether to also disable internal update handling (will cause errors, otherwise will simply use the NOOP handler)
|
||||
*/
|
||||
public function unsetEventHandler(bool $disableUpdateHandling = false): void
|
||||
public function unsetEventHandler(): void
|
||||
{
|
||||
$this->__call(__FUNCTION__, [$disableUpdateHandling]);
|
||||
$this->__call(__FUNCTION__, []);
|
||||
}
|
||||
/**
|
||||
* Update the 2FA password.
|
||||
|
@ -106,6 +106,8 @@ final class WebRunner extends RunnerAbstract
|
||||
|
||||
$payload = "GET $uri HTTP/1.1\r\nHost: {$_SERVER['SERVER_NAME']}\r\n\r\n";
|
||||
|
||||
Logger::log("Sending payload: $payload");
|
||||
|
||||
// We don't care for results or timeouts here, PHP doesn't count IOwait time as execution time anyway
|
||||
// Technically should use amphp/socket, but I guess it's OK to not introduce another dependency just for a socket that will be used once.
|
||||
\fwrite($res, $payload);
|
||||
|
@ -112,7 +112,9 @@ class Server extends SignalLoop
|
||||
}
|
||||
try {
|
||||
Logger::log("Starting IPC server $session (web)");
|
||||
$started = $started || WebRunner::start((string) $session, $id);
|
||||
if (WebRunner::start((string) $session, $id)) {
|
||||
$started = true;
|
||||
}
|
||||
} catch (Throwable $e) {
|
||||
Logger::log($e);
|
||||
}
|
||||
|
@ -101,9 +101,8 @@ trait Events
|
||||
/**
|
||||
* Unset event handler.
|
||||
*
|
||||
* @param bool $disableUpdateHandling Whether to also disable internal update handling (will cause errors, otherwise will simply use the NOOP handler)
|
||||
*/
|
||||
public function unsetEventHandler(bool $disableUpdateHandling = false): void
|
||||
public function unsetEventHandler(): void
|
||||
{
|
||||
$this->event_handler = null;
|
||||
$this->event_handler_instance = null;
|
||||
|
Loading…
x
Reference in New Issue
Block a user