Skip to content

Conversation

hlpmenu
Copy link

@hlpmenu hlpmenu commented Jan 27, 2025

What type of PR is this? (check all applicable)

  • Refactor
  • Feature
  • [ x] Bug Fix
  • Optimization
  • Documentation Update
  • Go Version Update
  • Dependency Update

Description

Added mutex:es as it in certain conditions was causing panics due to concurrent map writes.
Ex:

2025/01/27 11:05:48 GET | /api/auth/checkauthpermissions | -
IsDev: true, SNI: localhost, HttpsPort: :8080
Setting dev origin
fatal error: concurrent map writes
goroutine 260 [running]:
github.com/gorilla/sessions.(*Registry).Get(0xc0002c2680, {0xb932e0, 0xc0000b63e0}, {0xaa2878, 0xc})
	/path/go/pkg/mod/github.com/gorilla/[email protected]/sessions.go:141 +0x11f

Added/updated tests?

  • Yes
  • [x ] No, and this is why: such a small addition with no change in logic or extra behaviors
  • I need help with writing tests

Run verifications and test

  • make verify is passing
  • make test is passing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant