From dfe179fb9502eb3694edf2a77fb1df5a4ee0c78a Mon Sep 17 00:00:00 2001 From: Srinivas Baride Date: Thu, 1 Jul 2021 02:09:53 +0530 Subject: [PATCH] Fixed minor issues --- node/jobs.go | 2 +- rest/session/handlers.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/node/jobs.go b/node/jobs.go index 7094df9..4b7cf52 100644 --- a/node/jobs.go +++ b/node/jobs.go @@ -122,7 +122,7 @@ func (n *Node) jobUpdateSessions() error { } if !session.Status.Equal(hubtypes.StatusActive) { removePeer = true - if subscription.Status.Equal(hubtypes.StatusInactive) { + if session.Status.Equal(hubtypes.StatusInactive) { removeSession, skipUpdate = true, true } diff --git a/rest/session/handlers.go b/rest/session/handlers.go index 9312e25..8af2c0a 100644 --- a/rest/session/handlers.go +++ b/rest/session/handlers.go @@ -192,8 +192,8 @@ func handlerAddSession(ctx *context.Context) http.HandlerFunc { &types.Session{ ID: items[i].ID, }, - ).Delete( - &types.Session{}, + ).Update( + "address", "", ) } }