Adding subscription should be safe
and not happen while cleaning up
This commit is contained in:
parent
1735f11058
commit
2a0d88c3bb
|
@ -54,7 +54,9 @@ func (h *Hub) Sub(s *Subscription) {
|
|||
}
|
||||
}
|
||||
|
||||
h.lock.Lock()
|
||||
h.subscribers = append(h.subscribers, s)
|
||||
h.lock.Unlock()
|
||||
}
|
||||
|
||||
func (h *Hub) Info() map[string]map[string]uint {
|
||||
|
|
Loading…
Reference in New Issue