Skip to content

Commit

Permalink
redis presence: fix panic during EnableUserMapping option access
Browse files Browse the repository at this point in the history
  • Loading branch information
FZambia committed Jan 22, 2024
1 parent 1e26250 commit 117fa3e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion presence_redis.go
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ func (m *RedisPresenceManager) presenceStats(s *RedisShard, ch string) (Presence

// PresenceStats - see PresenceManager interface description.
func (m *RedisPresenceManager) PresenceStats(ch string) (PresenceStats, error) {
if m.config.EnableUserMapping(ch) {
if m.config.EnableUserMapping != nil && m.config.EnableUserMapping(ch) {
return m.presenceStats(m.getShard(ch), ch)
}

Expand Down

0 comments on commit 117fa3e

Please sign in to comment.