From f56f924ec78ff1a695de8b8e46700140d31db774 Mon Sep 17 00:00:00 2001 From: Rumen Vasilev Date: Mon, 6 Nov 2023 02:58:44 +0100 Subject: [PATCH] bugfix: panic, mutex not initialized Signed-off-by: Rumen Vasilev --- internal/session/session.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/internal/session/session.go b/internal/session/session.go index 4826cae..3efe3fc 100644 --- a/internal/session/session.go +++ b/internal/session/session.go @@ -2,6 +2,7 @@ package session import ( "runtime" + "sync" "time" "github.com/gin-gonic/gin" @@ -48,7 +49,7 @@ func initialize(cfg *config.Config) (*Session, error) { s := new(Session).withConfig(cfg) // init state - s.State = new(State) //&State{Mutex: &sync.Mutex{}} + s.State = &State{Mutex: &sync.Mutex{}} // init threads s.initThreads()