This repository was archived by the owner on Jan 6, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 897
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
Copy link
Copy link
Open
Description
SpaceEngineers/Sources/Sandbox.Game/Engine/Multiplayer/MyDedicatedServerBase.cs
Lines 245 to 263 in a109106
| 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
Labels
No labels