Skip to content

Constructor of GameServer/MasterServer throws exception for unavailable addresses. #10

@Alienmario

Description

@Alienmario

In the code below I would have expected the PerformQueryAsync method to perform all network operations, but it appears the constructor does too, which would need to be exception handled + wrapped in a task.

using var gameServer = new GameServer(masterServerResponse);
await gameServer.PerformQueryAsync(); // Might want to handle exceptions smartly.
System.Net.Sockets.SocketException (10051): A socket operation was attempted to an unreachable network. <IP>
   at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress)
   at System.Net.Sockets.Socket.Connect(EndPoint remoteEP)
   at System.Net.Sockets.UdpClient.Connect(IPEndPoint endPoint)
   at SteamQuery.GameServer.Initialize()
   at SteamQuery.GameServer.Reestablish()
   at SteamQuery.GameServer.set_IpEndPoint(IPEndPoint value)
   at SteamQuery.GameServer..ctor(IPEndPoint ipEndPoint)
   at SteamQuery.GameServer..ctor(IPAddress ip, Int32 port)
   at SteamQuery.GameServer..ctor(MasterServerResponse masterServerResponse)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions