mirror of
https://github.com/barelyprofessional/KfChatDotNet.git
synced 2026-04-30 03:22:04 -04:00
Don't let exceptions go unhandled on chat messages as it's causing issues with the websocket library
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user