Skip to content

Commit

Permalink
Merge pull request #840 from JustaPenguin/race-control-live-map-timeout
Browse files Browse the repository at this point in the history
only watch for disconnected drivers if the live map is enabled
  • Loading branch information
cj123 authored Apr 13, 2020
2 parents 08822fb + 296828a commit cd6ce7c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

---

Expand Down
5 changes: 5 additions & 0 deletions race_control.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit cd6ce7c

Please sign in to comment.