Add missing RLock in State.Channel
This commit is contained in:
parent
1a4bb2a004
commit
84f0b5d41a
1 changed files with 3 additions and 0 deletions
3
state.go
3
state.go
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue