Don't let exceptions go unhandled on chat messages as it's causing issues with the websocket library

This commit is contained in:
barelyprofessional
2026-02-12 09:07:16 -06:00
parent 75630e4053
commit d1e95b07d4

View File

@@ -308,7 +308,16 @@ public class ChatClient
{
_logger.Debug($"{JsonSerializer.Serialize(messages[0])}");
}
OnMessages?.Invoke(this, messages, data);
try
{
OnMessages?.Invoke(this, messages, data);
}
catch (Exception e)
{
_logger.Error("Our handler for chat messages threw an exception");
_logger.Error(e);
}
}
private void WsChatUsersJoined(ResponseMessage message)