Skip to content

Commit

Permalink
drop consumers if their out buffer fills up
Browse files Browse the repository at this point in the history
  • Loading branch information
whyrusleeping committed Nov 3, 2023
1 parent 7be9693 commit 6b31ee0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion events/events.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,10 @@ func (em *EventManager) broadcastEvent(evt *XRPCStreamEvent) {
em.rmSubscriber(torem)
}(s)
default:
log.Warnf("event overflow (%d)", len(s.outgoing))
log.Warnw("event overflow", "bufferSize", len(s.outgoing), "ident", s.ident)
go func(torem *Subscriber) {
em.rmSubscriber(torem)
}(s)
}
s.broadcastCounter.Inc()
}
Expand Down

0 comments on commit 6b31ee0

Please sign in to comment.