aboutsummaryrefslogtreecommitdiffstats
path: root/lib/xdsserver/sessions.go
diff options
context:
space:
mode:
Diffstat (limited to 'lib/xdsserver/sessions.go')
-rw-r--r--lib/xdsserver/sessions.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/xdsserver/sessions.go b/lib/xdsserver/sessions.go
index 69fe819..0c16b99 100644
--- a/lib/xdsserver/sessions.go
+++ b/lib/xdsserver/sessions.go
@@ -59,8 +59,8 @@ type Sessions struct {
stop chan struct{} // signals intentional stop
}
-// NewClientSessions .
-func NewClientSessions(ctx *Context, cookieMaxAge string) *Sessions {
+// ClientSessionsConstructor .
+func ClientSessionsConstructor(ctx *Context, cookieMaxAge string) *Sessions {
ckMaxAge, err := strconv.ParseInt(cookieMaxAge, 10, 0)
if err != nil {
ckMaxAge = 0
@@ -226,7 +226,7 @@ func (s *Sessions) monitorSessMap() {
s.mutex.Lock()
for _, ss := range s.sessMap {
- if ss.expireAt.Sub(time.Now()) < 0 {
+ if ss.expireAt.Sub(time.Now()) <= 0 {
s.Log.Debugf("Delete expired session id: %s", ss.ID)
delete(s.sessMap, ss.ID)
}