Browse Source

Pass v4 info to the right endpoint

pull/44/head
RogueException 9 years ago
parent
commit
35ec23d33c
2 changed files with 3 additions and 2 deletions
  1. +1
    -1
      src/Discord.Net/API/Client/Rest/Gateway.cs
  2. +2
    -1
      src/Discord.Net/Net/WebSockets/GatewaySocket.cs

+ 1
- 1
src/Discord.Net/API/Client/Rest/Gateway.cs View File

@@ -6,7 +6,7 @@ namespace Discord.API.Client.Rest
public class GatewayRequest : IRestRequest<GatewayResponse>
{
string IRestRequest.Method => "GET";
string IRestRequest.Endpoint => $"gateway?encoding=json&v=4";
string IRestRequest.Endpoint => $"gateway";
object IRestRequest.Payload => null;
}



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

@@ -43,7 +43,8 @@ namespace Discord.Net.WebSockets
//Token = rest.Token;

var gatewayResponse = await rest.Send(new GatewayRequest()).ConfigureAwait(false);
Logger.Verbose($"Login successful, gateway: {gatewayResponse.Url}");
string url = $"{gatewayResponse.Url}?encoding=json&v=4";
Logger.Verbose($"Login successful, gateway: {url}");

Host = gatewayResponse.Url;
await BeginConnect(parentCancelToken).ConfigureAwait(false);


Loading…
Cancel
Save