Fixed error with null proxycredentials

This commit is contained in:
RogueException
2015-10-18 18:25:53 -03:00
parent 98bad63957
commit 2969361333

View File

@@ -35,7 +35,7 @@ namespace Discord.Net
_webSocket.EmitOnPing = false; _webSocket.EmitOnPing = false;
_webSocket.EnableRedirection = true; _webSocket.EnableRedirection = true;
_webSocket.Compression = WebSocketSharp.CompressionMethod.None; _webSocket.Compression = WebSocketSharp.CompressionMethod.None;
_webSocket.SetProxy(_config.ProxyUrl, _config.ProxyCredentials.UserName, _config.ProxyCredentials.Password); _webSocket.SetProxy(_config.ProxyUrl, _config.ProxyCredentials?.UserName, _config.ProxyCredentials?.Password);
_webSocket.OnMessage += (s, e) => RaiseProcessMessage(e.Data); _webSocket.OnMessage += (s, e) => RaiseProcessMessage(e.Data);
_webSocket.OnError += async (s, e) => _webSocket.OnError += async (s, e) =>
{ {