mirror of
https://github.com/Sanae6/SmoOnlineServer.git
synced 2024-11-16 00:25:07 +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 {
|
await client.Send(new ShinePacket {
|
||||||
ShineId = shine
|
ShineId = shine
|
||||||
});
|
});
|
||||||
}
|
} catch {
|
||||||
catch {
|
|
||||||
// errors that can happen when sending will crash the server :)
|
// errors that can happen when sending will crash the server :)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async void SyncShineBag() {
|
async void SyncShineBag() {
|
||||||
|
try {
|
||||||
await Parallel.ForEachAsync(server.Clients, async (client, _) => { await ClientSyncShineBag(client); });
|
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);
|
Timer timer = new Timer(120000);
|
||||||
|
|
Loading…
Reference in a new issue