Closed lordib closed 1 year ago
Just want to state that I experience the same behaviour.
Fixed this by checking Msg.Message != null first, then if it is, next check if Msg.Exception is != null too, then if there is an exception write that. Otherwise just do nothing at all.
When exception Discord.Websocket.GatewayReconnectException occurs Client_Log tries to apply a ToString() method to a Msg.Message field which turns out to be null at the moment of error. As a result System.NullReferenceException is trown. The actual log message during Discord.Net.Websocket exception could be obtained with Msg.Exception.Message. That way System.NullReferenceException here could be evaded.