From 84f0b5d41adc4ee9b27548e729ee68c71fd20387 Mon Sep 17 00:00:00 2001 From: Chris Rhodes Date: Wed, 27 Apr 2016 14:38:29 -0700 Subject: [PATCH] Add missing RLock in State.Channel --- state.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/state.go b/state.go index 7993151..b170ce0 100644 --- a/state.go +++ b/state.go @@ -324,6 +324,9 @@ func (s *State) Channel(channelID string) (*Channel, error) { if s == nil { return nil, ErrNilState } + + s.Rlock() + defer s.RUnlock() if c, ok := s.channelMap[channelID]; ok { return c, nil