Skip to content

Commit

Permalink
made sure to use Promise.allSettled instead of sleeping for 500ms a…
Browse files Browse the repository at this point in the history
…fter login (#4592)
  • Loading branch information
CommanderStorm authored Mar 18, 2024
1 parent 0e3b3a9 commit 975761b
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions server/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -1619,15 +1619,15 @@ async function afterLogin(socket, user) {
socket.join(user.id);

let monitorList = await server.sendMonitorList(socket);
await sendInfo(socket);
await server.sendMaintenanceList(socket);
await sendNotificationList(socket);
await sendProxyList(socket);
await sendDockerHostList(socket);
await sendAPIKeyList(socket);
await sendRemoteBrowserList(socket);

await sleep(500);
await Promise.allSettled([
sendInfo(socket),
server.sendMaintenanceList(socket),
sendNotificationList(socket),
sendProxyList(socket),
sendDockerHostList(socket),
sendAPIKeyList(socket),
sendRemoteBrowserList(socket),
]);

await StatusPage.sendStatusPageList(io, socket);

Expand Down

0 comments on commit 975761b

Please sign in to comment.