mirror of
https://github.com/quexten/goldwarden.git
synced 2024-12-25 04:14:02 +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 func() {
|
||||||
go bitwarden.RunWebsocketDaemon(ctx, vault, &cfg)
|
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 {
|
if !runtimeConfig.DisableSSHAgent {
|
||||||
vaultAgent := ssh.NewVaultAgent(vault, &cfg)
|
vaultAgent := ssh.NewVaultAgent(vault, &cfg)
|
||||||
|
Loading…
Reference in New Issue
Block a user