Skip to content

Commit

Permalink
Tidy-ups.
Browse files Browse the repository at this point in the history
  • Loading branch information
mcdee committed Feb 29, 2024
1 parent cfbeb30 commit f563b0a
Showing 1 changed file with 6 additions and 11 deletions.
17 changes: 6 additions & 11 deletions http/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -245,11 +245,6 @@ func (s *Service) close() {
// its activation and sync states.
// This will call hooks supplied when creating the client if the state changes.
func (s *Service) CheckConnectionState(ctx context.Context) {
// TODO can we use the parent context?
//// We ignore the context passed in, and create a separate context to ensure that
//// the check isn't cancelled by a failed request that then subsequently calls here.
//ctx := context.Background()

log := zerolog.Ctx(ctx)

s.connectionMu.Lock()
Expand Down Expand Up @@ -295,13 +290,13 @@ func (s *Service) CheckConnectionState(ctx context.Context) {
s.clearStaticValues()
}

if !wasSynced && synced {
// Switched from not synced to synced.
}
// if !wasSynced && synced {
// // Switched from not synced to synced.
// }

if wasSynced && !synced {
// Switched from synced to not synced.
}
// if wasSynced && !synced {
// // Switched from synced to not synced.
// }

log.Trace().Bool("was_active", wasActive).Bool("active", active).Bool("was_synced", wasSynced).Bool("synced", synced).Msg("Updated connection state")

Expand Down

0 comments on commit f563b0a

Please sign in to comment.