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

Steam does not always return ip in timeout. #611

@Devidian

Description

@Devidian

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions