mirror of
https://github.com/gofiber/fiber.git
synced 2025-04-27 13:14:31 +00:00
Update memory.go The fix is to protect the access to s.db and save the result to a local variable.
This commit is contained in:
parent
01d39dbb81
commit
678728de6d
@ -139,5 +139,7 @@ func (s *Storage) gc() {
|
|||||||
|
|
||||||
// Return database client
|
// Return database client
|
||||||
func (s *Storage) Conn() map[string]entry {
|
func (s *Storage) Conn() map[string]entry {
|
||||||
|
s.mux.RLock()
|
||||||
|
defer s.mux.RUnlock()
|
||||||
return s.db
|
return s.db
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user