Fix missing lock

This commit is contained in:
Chris Rhodes 2016-01-16 01:25:05 -08:00
parent 6b73b588ba
commit ccb504b129

View file

@ -233,6 +233,9 @@ func (s *State) ChannelRemove(channel *Channel) error {
}
if channel.IsPrivate {
s.Lock()
defer s.Unlock()
for i, c := range s.PrivateChannels {
if c.ID == channel.ID {
s.PrivateChannels = append(s.PrivateChannels[:i], s.PrivateChannels[i+1:]...)