RogueException 9 years ago
parent
commit
26cafdbcd1
2 changed files with 3 additions and 2 deletions
  1. +1
    -1
      src/Discord.Net/Net/WebSockets/Commands.cs
  2. +2
    -1
      src/Discord.Net/Net/WebSockets/WebSocket.BuiltIn.cs

+ 1
- 1
src/Discord.Net/Net/WebSockets/Commands.cs View File

@@ -26,7 +26,7 @@ namespace Discord.Net.WebSockets
[JsonProperty(PropertyName = "token")]
public string Token;
[JsonProperty(PropertyName = "v")]
public int Version = 2;
public int Version = 3;
[JsonProperty(PropertyName = "properties")]
public Dictionary<string, string> Properties = new Dictionary<string, string>();
}


+ 2
- 1
src/Discord.Net/Net/WebSockets/WebSocket.BuiltIn.cs View File

@@ -85,7 +85,8 @@ namespace Discord.Net.WebSockets
}

if (result.MessageType == WebSocketMessageType.Close)
throw new Exception($"Got Close Message ({result.CloseStatus?.ToString() ?? "Unexpected"}): {result.CloseStatusDescription ?? "No Reason"}");
throw new Exception($"Got Close Message ({result.CloseStatus?.ToString() ?? "Unexpected"}): " +
result.CloseStatusDescription != "" ? result.CloseStatusDescription : "No Reason");
else
builder.Append(Encoding.UTF8.GetString(buffer.Array, buffer.Offset, result.Count));



Loading…
Cancel
Save