depricate inner promise

move inner promise to outer promise
This commit is contained in:
vishalsabhaya 2024-09-04 16:24:22 +09:00
parent bb499e2aa1
commit 96a1010b30

View File

@ -1648,12 +1648,8 @@ async function afterLogin(socket, user) {
const monitorPromises = [];
for (let monitorID in monitorList.list) {
monitorPromises.push(
Promise.all([
sendHeartbeatList(socket, monitorID),
Monitor.sendStats(io, monitorID, user.id)
])
);
monitorPromises.push(sendHeartbeatList(socket, monitorID));
monitorPromises.push(Monitor.sendStats(io, monitorID, user.id));
}
await Promise.all(monitorPromises);