GramJS: Fix async handler errors (#6261)
This commit is contained in:
parent
193b9873a9
commit
1d4db8f131
@ -152,7 +152,7 @@ export default class MTProtoSender {
|
|||||||
|
|
||||||
_getShouldDebugExportedSenders?: () => boolean;
|
_getShouldDebugExportedSenders?: () => boolean;
|
||||||
|
|
||||||
private readonly _handlers: Record<number, (message: TLMessage) => void>;
|
private readonly _handlers: Record<number, (message: TLMessage) => void | Promise<void>>;
|
||||||
|
|
||||||
private readonly _onConnectionBreak?: CallableFunction;
|
private readonly _onConnectionBreak?: CallableFunction;
|
||||||
|
|
||||||
@ -813,7 +813,7 @@ export default class MTProtoSender {
|
|||||||
handler = this._handleUpdate.bind(this);
|
handler = this._handleUpdate.bind(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
handler(message);
|
await handler(message);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user