Skip to content

Commit

Permalink
Add Missing Parameter For WebSocket4Net Constructor (#968)
Browse files Browse the repository at this point in the history
* Add missing param to constructor

This should fix `15:02:44 Gateway     System.MissingMethodException: Method not found: 'Void WebSocket4Net.WebSocket..ctor(System.String, System.String, System.Collections.Generic.List`1<System.Collections.Generic.KeyValuePair`2<System.String,System.String>>, System.Collections.Generic.List`1<System.Collections.Generic.KeyValuePair`2<System.String,System.String>>, System.String, System.String, WebSocket4Net.WebSocketVersion, System.Net.EndPoint)'.`

* Bump WS4N to latest stable
  • Loading branch information
Headline authored and foxbot committed Mar 4, 2018
1 parent 4edbd8d commit 8537924
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@
<ProjectReference Include="..\Discord.Net.Core\Discord.Net.Core.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="WebSocket4Net" Version="0.15.0" />
<PackageReference Include="WebSocket4Net" Version="0.15.2" />
</ItemGroup>
</Project>
4 changes: 2 additions & 2 deletions src/Discord.Net.Providers.WS4Net/WS4NetClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ private async Task ConnectInternalAsync(string host)
_cancelTokenSource = new CancellationTokenSource();
_cancelToken = CancellationTokenSource.CreateLinkedTokenSource(_parentToken, _cancelTokenSource.Token).Token;

_client = new WS4NetSocket(host, customHeaderItems: _headers.ToList())
_client = new WS4NetSocket(host, "", customHeaderItems: _headers.ToList())
{
EnableAutoSendPing = false,
NoDelay = true,
Expand Down Expand Up @@ -163,4 +163,4 @@ private void OnClosed(object sender, object e)
Closed(ex).GetAwaiter().GetResult();
}
}
}
}

0 comments on commit 8537924

Please sign in to comment.