Commit 9a9dc5bca5421b34b67dfedc0997510b48c42b7e

Authored by Adhidarma Hadiwinoto
1 parent ccd4f6b5be
Exists in master

Ping to ourself

Showing 1 changed file with 5 additions and 3 deletions Side-by-side Diff

... ... @@ -88,8 +88,13 @@ const pingSender = async () => {
88 88 if (mutex.tryLock()) {
89 89 const msg = `PING ${xid}`;
90 90  
  91 + bot.send(config.username, msg);
  92 +
91 93 const partnerCount = config.custom_ping.send_to.length;
92 94 for (let i = 0; i < partnerCount; i += 1) {
  95 + // eslint-disable-next-line no-await-in-loop
  96 + await sleepMs(1000);
  97 +
93 98 const partner = config.custom_ping.send_to[i];
94 99  
95 100 if (config.custom_ping.verbose) {
... ... @@ -101,9 +106,6 @@ const pingSender = async () =&gt; {
101 106 }
102 107  
103 108 bot.send(partner, msg);
104   -
105   - // eslint-disable-next-line no-await-in-loop
106   - await sleepMs(1000);
107 109 }
108 110  
109 111 mutex.unlock();