Add missing RLock in State.Channel

This commit is contained in:
Chris Rhodes 2016-04-27 14:38:29 -07:00
parent 1a4bb2a004
commit 84f0b5d41a

View file

@ -325,6 +325,9 @@ func (s *State) Channel(channelID string) (*Channel, error) {
return nil, ErrNilState
}
s.Rlock()
defer s.RUnlock()
if c, ok := s.channelMap[channelID]; ok {
return c, nil
}