From 4a010e4a9fc8e20bc21dd66f5eef548f02ebe116 Mon Sep 17 00:00:00 2001 From: DanB Date: Mon, 19 Sep 2016 12:45:39 +0200 Subject: [PATCH] SMGeneric - Synchronous saveOperations in sessionEnd --- sessionmanager/smgeneric.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sessionmanager/smgeneric.go b/sessionmanager/smgeneric.go index 2b3e3d139..0b4b77987 100644 --- a/sessionmanager/smgeneric.go +++ b/sessionmanager/smgeneric.go @@ -305,11 +305,11 @@ func (self *SMGeneric) sessionEnd(sessionId string, usage time.Duration) error { if err := s.close(aTime.Add(usage)); err != nil { utils.Logger.Err(fmt.Sprintf(" Could not close session: %s, runId: %s, error: %s", sessionId, s.runId, err.Error())) } - go func() { // Call it in goroutine since it could take a while to compress timespans and save them - if err := s.saveOperations(sessionId); err != nil { - utils.Logger.Err(fmt.Sprintf(" Could not save session: %s, runId: %s, error: %s", sessionId, s.runId, err.Error())) - } - }() + //go func() { // Call it in goroutine since it could take a while to compress timespans and save them + if err := s.saveOperations(sessionId); err != nil { + utils.Logger.Err(fmt.Sprintf(" Could not save session: %s, runId: %s, error: %s", sessionId, s.runId, err.Error())) + } + //}() } return nil, nil }, time.Duration(2)*time.Second, sessionId)