Browse Source

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.
tags/1.0-rc
Christopher F 8 years ago
parent
commit
0b42a2b1b4
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      src/Discord.Net.WebSocket/DiscordSocketClient.cs

+ 1
- 1
src/Discord.Net.WebSocket/DiscordSocketClient.cs View File

@@ -45,7 +45,7 @@ namespace Discord.WebSocket
public ConnectionState ConnectionState { get; private set; }
/// <summary> Gets the estimated round-trip latency, in milliseconds, to the gateway server. </summary>
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


Loading…
Cancel
Save