Fix websocket sometimes not connecting
This commit is contained in:
parent
4c8fb1d2ab
commit
76694b5fdf
2 changed files with 2 additions and 2 deletions
|
|
@ -52,7 +52,6 @@ const (
|
||||||
)
|
)
|
||||||
|
|
||||||
func RunWebsocketDaemon(ctx context.Context, vault *vault.Vault, cfg *config.Config) {
|
func RunWebsocketDaemon(ctx context.Context, vault *vault.Vault, cfg *config.Config) {
|
||||||
time.Sleep(5 * time.Second)
|
|
||||||
for {
|
for {
|
||||||
if cfg.IsLocked() {
|
if cfg.IsLocked() {
|
||||||
time.Sleep(5 * time.Second)
|
time.Sleep(5 * time.Second)
|
||||||
|
|
|
||||||
|
|
@ -195,8 +195,9 @@ func StartUnixAgent(path string, runtimeConfig config.RuntimeConfig) error {
|
||||||
// polling, switch this to signal based later
|
// polling, switch this to signal based later
|
||||||
if !cfg.IsLocked() && cfg.IsLoggedIn() {
|
if !cfg.IsLocked() && cfg.IsLoggedIn() {
|
||||||
bitwarden.RunWebsocketDaemon(ctx, vault, &cfg)
|
bitwarden.RunWebsocketDaemon(ctx, vault, &cfg)
|
||||||
|
time.Sleep(60 * time.Second)
|
||||||
}
|
}
|
||||||
time.Sleep(60 * time.Second)
|
time.Sleep(1 * time.Second)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue