From 0b42a2b1b429e56509f4fc9c2e36e2e83034dd51 Mon Sep 17 00:00:00 2001 From: Christopher F Date: Sat, 22 Oct 2016 13:14:36 -0400 Subject: [PATCH] Assign a default value to DiscordSocketClient.Status This property previously had a default value of 'null'. In DiscordSocketClient#ConnectInternalAsync, we would attempt to send a null status to Discord, which would fail to serialize, and force the client to disconnect. --- src/Discord.Net.WebSocket/DiscordSocketClient.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Discord.Net.WebSocket/DiscordSocketClient.cs b/src/Discord.Net.WebSocket/DiscordSocketClient.cs index 27825e64b..3eb4158d1 100644 --- a/src/Discord.Net.WebSocket/DiscordSocketClient.cs +++ b/src/Discord.Net.WebSocket/DiscordSocketClient.cs @@ -45,7 +45,7 @@ namespace Discord.WebSocket public ConnectionState ConnectionState { get; private set; } /// Gets the estimated round-trip latency, in milliseconds, to the gateway server. public int Latency { get; private set; } - internal UserStatus Status { get; private set; } + internal UserStatus Status { get; private set; } = UserStatus.Online; internal Game? Game { get; private set; } //From DiscordSocketConfig