mirror of
https://github.com/Sanae6/SmoOnlineServer.git
synced 2024-11-22 03:05:16 +00:00
Fix another shine sync crash
This commit is contained in:
parent
00626ab12f
commit
412607c0c9
1 changed files with 6 additions and 3 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue