Fixing potential issue with GB provider (resolving non-existing promise)
This commit is contained in:
parent
70ba09e9b6
commit
6117174f87
@ -45,9 +45,9 @@ class TGProvider {
|
||||
|
||||
async getReport(number) {
|
||||
try {
|
||||
await this.tgClient.sendMessage(this.chat, number);
|
||||
let waitResponseTask = Utils.promiseWithResolvers();
|
||||
this.checksMap.set(number, waitResponseTask);
|
||||
await this.tgClient.sendMessage(this.chat, number);
|
||||
setTimeout(() => {
|
||||
waitResponseTask.reject(Error('TG report timeout'));
|
||||
}, 25000);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user