Skip to content

Commit

Permalink
feat: Remove unnecessary session mutex lock in decodeSessionData func…
Browse files Browse the repository at this point in the history
…tion
  • Loading branch information
sixcolors committed Jun 29, 2024
1 parent a1edc83 commit 4a0b4ce
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions middleware/session/session.go
Original file line number Diff line number Diff line change
Expand Up @@ -292,8 +292,6 @@ func (s *Session) delSession() {

// decodeSessionData decodes the session data from raw bytes.
func (s *Session) decodeSessionData(rawData []byte) error {
s.mu.Lock()
defer s.mu.Unlock()
_, _ = s.byteBuffer.Write(rawData)
encCache := gob.NewDecoder(s.byteBuffer)
if err := encCache.Decode(&s.data.Data); err != nil {
Expand Down

0 comments on commit 4a0b4ce

Please sign in to comment.