Replaced logging of the disconnection exception as it basically never had any value. Serializing provides a lot more useful information including the reason the server sent

This commit is contained in:
barelyprofessional
2024-06-30 20:02:05 +08:00
parent a865730918
commit 83a5e149ef
6 changed files with 6 additions and 5 deletions

View File

@@ -101,7 +101,7 @@ public class ChatClient
private void WsDisconnection(DisconnectionInfo disconnectionInfo)
{
_logger.Error($"Client disconnected from the chat (or never successfully connected). Type is {disconnectionInfo.Type}");
_logger.Error(disconnectionInfo.Exception);
_logger.Error(JsonSerializer.Serialize(disconnectionInfo));
OnWsDisconnection?.Invoke(this, disconnectionInfo);
}