mirror of
https://github.com/gravitational/teleport.git
synced 2026-11-02 06:08:23 +08:00
* Make SessionTracker heartbeat loop more robust `(*SessionTracker).UpdateExpirationLoop` terminated the first time it got an error attempting to persist the updated expiry to Auth. A momentary network outage could prevent the `types.SessionTracker` from being updated again causing it to have the wrong TTL in the backend. This could result in sessions sticking around longer than needed or being assumed to have been terminated prior to the session actually ending. A `retryutils.Retry` has been added to allow for retrying to update a `types.SessionTracker` with some backoff. The retry loop will continue until the session is closed, the update is successful, or the retry has occurred for longer than the `types.SessionTrackers` last known expiry. `apidefaults.SessionTrackerTTL` was also reduced from 1h to 30m to reduce the amount of time a stale tracker may linger in the backend. The added robustness to the update loop should alleviate the need for the lengthy TTL.