Skip to content

Commit

Permalink
Prevent crash from RaidLeave failure
Browse files Browse the repository at this point in the history
  • Loading branch information
Lacyway committed May 5, 2024
1 parent 210b183 commit 04651fa
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions Fika.Core/Coop/GameMode/CoopGame.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1374,8 +1374,15 @@ public override void Stop(string profileId, ExitStatus exitStatus, string exitNa

wavesSpawnScenario_0?.Stop();

PlayerLeftRequest body = new PlayerLeftRequest(myPlayer.ProfileId);
FikaRequestHandler.RaidLeave(body);
try
{
PlayerLeftRequest body = new(myPlayer.ProfileId);
FikaRequestHandler.RaidLeave(body);
}
catch (Exception)
{
FikaPlugin.Instance.FikaLogger.LogError("Unable to send RaidLeave request to server.");
}

if (CoopHandler.TryGetCoopHandler(out CoopHandler coopHandler))
{
Expand Down

0 comments on commit 04651fa

Please sign in to comment.