From 296828a69c38a4dfda450a6f2f7d5343d7672a69 Mon Sep 17 00:00:00 2001 From: Callum Jones Date: Sat, 11 Apr 2020 15:07:26 +0100 Subject: [PATCH] only watch for disconnected drivers if the live map is enabled --- CHANGELOG.md | 1 + race_control.go | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index b5d58955c..5de6a289d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -26,6 +26,7 @@ Fixes: * Fixes an issue where Live Timings would not show all cars driven by a driver (for example if they were switching cars in a session to test them out) * Fixes an issue where running stracker could cause a server crash when Server Manager changed the real time position interval. In some extreme cases you may find your live map running in slow motion, currently disabling stracker is the only fix for this. * Reworked the pagination of Results and Cars pages to make it a bit more usable. +* Fixes an issue where drivers would be removed from Live Timings if the Live Map was disabled. --- diff --git a/race_control.go b/race_control.go index 389502c73..8fe80386a 100644 --- a/race_control.go +++ b/race_control.go @@ -160,6 +160,11 @@ func (rc *RaceControl) UDPCallback(message udp.Message) { var driverTimeout = time.Minute * 5 func (rc *RaceControl) watchForTimedOutDrivers() { + if udp.RealtimePosIntervalMs <= 0 { + // with no real time pos interval, we have no driver positions, so no last update time. + return + } + ticker := time.NewTicker(time.Minute) for range ticker.C {