summaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
authorjwijenbergh <jeroenwijenbergh@protonmail.com>2022-12-15 12:51:11 +0100
committerjwijenbergh <jeroenwijenbergh@protonmail.com>2022-12-15 12:51:11 +0100
commit87193768abd2bbc5c880dd59846512083f51990d (patch)
tree196368f3b96b27f6ddb81a9df51e8b62a2199eef /client
parentcc622226c57351703d0bdb3e32659d70a7ca9e7c (diff)
Client Server: Use double pointer to check errors As
Diffstat (limited to 'client')
-rw-r--r--client/server.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/client/server.go b/client/server.go
index 7a54e58..4c00986 100644
--- a/client/server.go
+++ b/client/server.go
@@ -44,7 +44,8 @@ func (c *Client) retryConfigAuth(srv server.Server, preferTCP bool) (string, str
}
if err != nil {
// Only retry if the error is that the tokens are invalid
- if errors.As(err, &oauth.TokensInvalidError{}) {
+ tErr := &oauth.TokensInvalidError{}
+ if errors.As(err, &tErr) {
cfg, cfgType, err = c.getConfigAuth(srv, preferTCP)
if err == nil {
return cfg, cfgType, nil