Skip to content

v0.10.37: renew the cloud session

Choose a tag to compare

@gnacho gnacho released this 06 Nov 05:41
· 20 commits to main since this release

The daemon no longer keeps talking into a dead session.

Fixed

  • After a few hours up, the API answered every cloud call with a timeout
    (get-device-list, get-device-token) while the same credentials worked from
    a fresh process and the container reached the vendor host fine. The duplex
    channels behind the stored session die silently and the daemon kept using them.
  • The device list, the device token and the periodic check now go through a
    wrapper that renews the session and retries once when the error looks like a
    dead connection, and keeps the original error when the renewal fails.

Verified

  • TestStaleSessionDetectsDeadConnections, TestCloudCallDoesNotRetryOtherErrors
    and TestCloudCallKeepsOriginalErrorWhenReloginFails.
  • gofmt, go vet clean, full suite green in 8.6 s, coverage 62.7%.

Not verified

  • The renewal itself against the real vendor cloud: it needs a session that dies
    while the process stays up.