mirror of
https://github.com/quexten/goldwarden.git
synced 2024-12-24 20:03:22 +03:00
Reconnect websocket on unlock
This commit is contained in:
parent
faf66da833
commit
8263094c03
@ -182,9 +182,17 @@ func StartUnixAgent(path string, runtimeConfig config.RuntimeConfig) error {
|
||||
}
|
||||
}()
|
||||
|
||||
if !runtimeConfig.WebsocketDisabled {
|
||||
go bitwarden.RunWebsocketDaemon(ctx, vault, &cfg)
|
||||
}
|
||||
go func() {
|
||||
if !runtimeConfig.WebsocketDisabled {
|
||||
for {
|
||||
// polling, switch this to signal based later
|
||||
if !cfg.IsLocked() && cfg.IsLoggedIn() {
|
||||
bitwarden.RunWebsocketDaemon(ctx, vault, &cfg)
|
||||
}
|
||||
time.Sleep(60 * time.Second)
|
||||
}
|
||||
}
|
||||
}()
|
||||
|
||||
if !runtimeConfig.DisableSSHAgent {
|
||||
vaultAgent := ssh.NewVaultAgent(vault, &cfg)
|
||||
|
Loading…
Reference in New Issue
Block a user