(SessionCookie sessionCookie)
| 264 | } |
| 265 | |
| 266 | private static void EnforceTimeout(SessionCookie sessionCookie) |
| 267 | { |
| 268 | if (sessionCookie.TimeoutSecs != 0) |
| 269 | { |
| 270 | _sessionTimeoutTimestamp = DateTimeOffset.Now.AddSeconds(sessionCookie.TimeoutSecs); |
| 271 | } |
| 272 | |
| 273 | if (_sessionTimeoutTimestamp != DateTimeOffset.MaxValue) |
| 274 | { |
| 275 | while (!_isShutdown && _sessionTimeoutTimestamp > DateTimeOffset.Now) |
| 276 | Thread.Sleep(1000); |
| 277 | |
| 278 | // If we didn't shutdown yet, that means we timed out |
| 279 | if (!_isShutdown) |
| 280 | { |
| 281 | LogMessage($"Session Timeout exceeded at {DateTimeOffset.Now.ToString()}..."); |
| 282 | OnShutdown(); |
| 283 | } |
| 284 | } |
| 285 | } |
| 286 | |
| 287 | /// <summary> |
| 288 | /// Listens for any requests and responds with the game host's config values |
nothing calls this directly
no test coverage detected