Skip to content

Commit

Permalink
Update websocket backoff behoviour
Browse files Browse the repository at this point in the history
  • Loading branch information
quexten committed Dec 22, 2023
1 parent 189b151 commit f4e908f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions agent/bitwarden/websocket.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,10 @@ const (
)

func RunWebsocketDaemon(ctx context.Context, vault *vault.Vault, cfg *config.Config) {
time.Sleep(5 * time.Second)
for {
time.Sleep(WEBSOCKET_SLEEP_DURATION_SECONDS * time.Second)

if cfg.IsLocked() {
time.Sleep(5 * time.Second)
continue
}

Expand All @@ -65,6 +65,8 @@ func RunWebsocketDaemon(ctx context.Context, vault *vault.Vault, cfg *config.Con
websocketLog.Error("Websocket error %s", err)
}
}

time.Sleep(WEBSOCKET_SLEEP_DURATION_SECONDS * time.Second)
}
}

Expand Down

0 comments on commit f4e908f

Please sign in to comment.