This method here works fine when I am testing locally, but once I put it up on the fleet it doesn’t seem to work.
Yup my port checking was running at the same time at start for each process, nevermind
I will debug it further to see what result is actually happening. Maybe I am mistaken with how GameLift handles processes, I am wondering if each instance is set to 2 processes, these processes are on standby until a game session is created or something else.
What failures are you seeing? What are you trying to do exactly?
If you are trying to find a free port for the server, you can just pass in port assignments in your runtime configuration ie --port 12345 and have the server bind to this port.
If you need to scan for open ports, theres plenty of alternatives here: https://stackoverflow.com/questions/138043/find-the-next-tcp-port-in-net