Commit 52d362a9 authored by Jason Yellick's avatar Jason Yellick Committed by Gerrit Code Review
Browse files

Merge "[FAB-10924] data race during event handler cleanup"

parents 9e01151d f48cf5c9
......@@ -219,12 +219,11 @@ func (ep *eventProcessor) deregisterHandler(ie *pb.Interest, h *handler) error {
}
func (ep *eventProcessor) deregisterAll(h *handler) {
for k, v := range h.interestedEvents {
for _, v := range h.interestedEvents {
if err := ep.deregisterHandler(v, h); err != nil {
logger.Errorf("failed deregistering event type %s for %s", v, h.RemoteAddr)
continue
}
delete(h.interestedEvents, k)
}
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment