Fix another shine sync crash

This commit is contained in:
Sanae 2022-03-01 19:42:14 -06:00
parent 00626ab12f
commit 412607c0c9
1 changed files with 6 additions and 3 deletions

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);