From: AeonLucid Date: Sat, 24 Oct 2020 20:51:22 +0000 (+0200) Subject: Add disconnect reason when reason is null X-Git-Tag: v1.2.2~96^2~6 X-Git-Url: https://git.deb.at/?a=commitdiff_plain;h=055366fed82bcf909be9db25b3d5b001f35bc2d9;p=rhonda%2Fimpostor.git Add disconnect reason when reason is null --- diff --git a/src/Impostor.Server/Net/Client.cs b/src/Impostor.Server/Net/Client.cs index cceb48c..8c0ffcd 100644 --- a/src/Impostor.Server/Net/Client.cs +++ b/src/Impostor.Server/Net/Client.cs @@ -334,7 +334,7 @@ namespace Impostor.Server.Net Message01JoinGameS2C.SerializeError(packet, false, reason, message); await Connection.SendAsync(packet); - await Connection.DisconnectAsync(message); + await Connection.DisconnectAsync(message ?? reason.ToString()); } } } \ No newline at end of file