Merge pull request #184 from iopred/patch-7

Add missing RLock in State.Channel
This commit is contained in:
Bruce 2016-04-27 16:47:49 -05:00
commit f64bae1371

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
}