0
0
Fork 0
mirror of https://github.com/Sanae6/SmoOnlineServer.git synced 2024-11-25 04:35:18 +00:00

Fix another shine sync crash

This commit is contained in:
Sanae 2022-03-01 19:42:14 -06:00
parent 00626ab12f
commit 412607c0c9

View file

@ -32,14 +32,17 @@ async Task ClientSyncShineBag(Client client) {
await client.Send(new ShinePacket {
ShineId = shine
});
}
catch {
} catch {
// errors that can happen when sending will crash the server :)
}
}
async void SyncShineBag() {
await Parallel.ForEachAsync(server.Clients, async (client, _) => { await ClientSyncShineBag(client); });
try {
await Parallel.ForEachAsync(server.Clients, async (client, _) => { await ClientSyncShineBag(client); });
} catch {
// errors that can happen shines change will crash the server :)
}
}
Timer timer = new Timer(120000);