Retry without FAST if FAST authentication fails.

v0.10
Martin Dosch 1 month ago
parent 79897fd295
commit e244f14548
No known key found for this signature in database
GPG Key ID: 52A57CFCE13D657D

@ -365,7 +365,24 @@ func main() {
// Connect to server.
client, err := connect(options, *flagDirectTLS)
if err != nil {
log.Fatal(err)
if fast.Token != "" {
// Reset FAST token and mechanism if FAST login failed.
fast.Token = ""
fast.Mechanism = ""
fast.Expiry = time.Now()
err := writeFastData(user, password, fast)
if err != nil {
fmt.Println(err)
}
options.FastToken = ""
// Try to connect to server without FAST.
client, err = connect(options, *flagDirectTLS)
if err != nil {
log.Fatal(err)
}
} else {
log.Fatal(err)
}
}
// Store fast token if a new one is received.

Loading…
Cancel
Save