summaryrefslogtreecommitdiffstats
path: root/lib/xdsserver/sessions.go
diff options
context:
space:
mode:
authorSebastien Douheret <sebastien.douheret@iot.bzh>2018-02-23 18:45:15 +0100
committerSebastien Douheret <sebastien.douheret@iot.bzh>2018-02-23 18:45:15 +0100
commit65e09e831cf13343ac713fbf15281174d1f13a94 (patch)
tree0176a263ecf6d1059a272007c6f450770f5792ca /lib/xdsserver/sessions.go
parente97eebc18d726aa55738d7e19513491cf58a6e3a (diff)
Added target and terminal support.v1.1.0
Signed-off-by: Sebastien Douheret <sebastien.douheret@iot.bzh>
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)
}