Skip to content

Commit

Permalink
fix: session refresh
Browse files Browse the repository at this point in the history
  • Loading branch information
habib committed Feb 20, 2024
1 parent 31ae704 commit c478932
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion zia/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ func (c *Client) checkSession() error {
} else {
now := time.Now()
// Refresh if session has expire time (diff than -1) & c.sessionTimeout less than jSessionTimeoutOffset time remaining. You never refresh on exact timeout.
if c.session.PasswordExpiryTime > 0 && c.sessionRefreshed.Add(c.sessionTimeout-jSessionTimeoutOffset).Before(now) {
if c.session.PasswordExpiryTime > 0 && c.sessionRefreshed.Add(c.sessionTimeout-jSessionTimeoutOffset).After(now) {
err := c.refreshSession()
if err != nil {
c.Logger.Printf("[ERROR] failed to refresh session id: %v\n", err)
Expand Down

0 comments on commit c478932

Please sign in to comment.