Skip to content
This repository has been archived by the owner on Jan 6, 2022. It is now read-only.

Steam does not always return ip in timeout. #611

Open
Devidian opened this issue Oct 28, 2021 · 0 comments
Open

Steam does not always return ip in timeout. #611

Devidian opened this issue Oct 28, 2021 · 0 comments

Comments

@Devidian
Copy link

Devidian commented Oct 28, 2021

int timeout = 100;
while (ip == 0 && timeout > 0)
{
SteamSDK.SteamServerAPI.Instance.GameServer.RunCallbacks();
Thread.Sleep(100);
timeout--;
ip = SteamSDK.SteamServerAPI.Instance.GameServer.GetPublicIP();
id = SteamSDK.SteamServerAPI.Instance.GameServer.GetSteamID();
}
MySandboxGame.Services.SteamService.UserId = id;
if (ip == 0)
{
MyLog.Default.WriteLineAndConsole("Error: No IP assigned.");
return;
}

This seems to be still an issue in the current code. Especially when running dedicated Server in a docker container, it is very often running into a "Error: No IP assigned."

Would be great if you can fix that in the current codebase! (maybe tick for >10hz as recommended by steam and use a higher timeout than 10 seconds)

https://partner.steamgames.com/doc/api/steam_gameserver#SteamGameServer_RunCallbacks

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant