Skip to content

Commit

Permalink
Merge pull request #634 from yaakov-h/626-stitch
Browse files Browse the repository at this point in the history
Fix websocket servers not being marked as bad by the server list
  • Loading branch information
yaakov-h authored Feb 9, 2019
2 parents 4502f4e + 2de520a commit 3fe0d9e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions SteamKit2/SteamKit2/Networking/Steam3/WebSocketConnection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ partial class WebSocketConnection : IConnection

public event EventHandler<DisconnectedEventArgs> Disconnected;

public EndPoint CurrentEndPoint => currentContext?.EndPoint;

public EndPoint CurrentEndPoint { get; set; }
public ProtocolTypes ProtocolTypes => ProtocolTypes.WebSocket;

public void Connect(EndPoint endPoint, int timeout = 5000)
Expand All @@ -29,6 +28,7 @@ public void Connect(EndPoint endPoint, int timeout = 5000)
Disconnected?.Invoke(this, new DisconnectedEventArgs(false));
}

CurrentEndPoint = newContext.EndPoint;
newContext.Start(TimeSpan.FromMilliseconds(timeout));
}

Expand Down Expand Up @@ -58,6 +58,7 @@ void DisconnectCore(bool userInitiated, WebSocketContext specificContext)
oldContext.Dispose();

Disconnected?.Invoke(this, new DisconnectedEventArgs(userInitiated));
CurrentEndPoint = null;
}
else
{
Expand Down

0 comments on commit 3fe0d9e

Please sign in to comment.