mirror of
https://github.com/danog/MadelineProto.git
synced 2024-11-30 10:38:59 +01:00
Improve logic
This commit is contained in:
parent
b6ecffaf4d
commit
42ecf91720
@ -308,7 +308,8 @@ trait ResponseHandler
|
||||
$this->methodRecall(['message_id' => $request->getMsgId(), 'postpone' => true]);
|
||||
return null;
|
||||
}
|
||||
if ($response['error_code'] === -503 || \in_array($response['error_message'], ['MSGID_DECREASE_RETRY', 'HISTORY_GET_FAILED', 'RPC_CONNECT_FAILED', 'RPC_CALL_FAIL', 'RPC_MCGET_FAIL', 'PERSISTENT_TIMESTAMP_OUTDATED', 'RPC_MCGET_FAIL', 'no workers running', 'No workers running', '-503'])) {
|
||||
if ((($response['error_code'] === -503 || $response['error_message'] === '-503') && !\in_array($request->getConstructor(), ['messages.getBotCallbackAnswer', 'messages.getInlineBotResults'], true))
|
||||
|| (\in_array($response['error_message'], ['MSGID_DECREASE_RETRY', 'HISTORY_GET_FAILED', 'RPC_CONNECT_FAILED', 'RPC_CALL_FAIL', 'RPC_MCGET_FAIL', 'PERSISTENT_TIMESTAMP_OUTDATED', 'RPC_MCGET_FAIL', 'no workers running', 'No workers running']))) {
|
||||
EventLoop::delay(1.0, fn () => $this->methodRecall(['message_id' => $request->getMsgId()]));
|
||||
return null;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user