Update websocket backoff behaviour
This commit is contained in:
parent
189b1511f8
commit
ebe3dd44b5
|
@ -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
|
||||
}
|
||||
|
||||
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue