Skip to content

Commit

Permalink
bugfix: panic, mutex not initialized
Browse files Browse the repository at this point in the history
Signed-off-by: Rumen Vasilev <[email protected]>
  • Loading branch information
rumenvasilev committed Nov 6, 2023
1 parent 89c6016 commit f56f924
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion internal/session/session.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package session

import (
"runtime"
"sync"
"time"

"github.com/gin-gonic/gin"
Expand Down Expand Up @@ -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()
Expand Down

0 comments on commit f56f924

Please sign in to comment.