fix: ping peer response handling

causes treating all members online

fix async/await usage
This commit is contained in:
Syrone Wong 2023-06-01 08:34:42 +08:00 committed by dec0dOS
parent 8785b94392
commit db8f4979e6
2 changed files with 18 additions and 14 deletions

View file

@ -65,9 +65,9 @@ if (process.env.ZU_LAST_SEEN_FETCH !== "false") {
cron.schedule(schedule, () => {
console.debug("Running scheduled job");
const networks = db.get("networks").value();
networks.forEach((network) => {
console.debug("Processing " + network.id);
pingAll(network);
networks.forEach(async (network) => {
console.debug("Processing network " + network.id);
await pingAll(network);
});
});
}