From 6b31ee0ea5098eab51e973a37c71d2b4e63f36a7 Mon Sep 17 00:00:00 2001 From: whyrusleeping Date: Fri, 3 Nov 2023 10:23:37 -0700 Subject: [PATCH] drop consumers if their out buffer fills up --- events/events.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/events/events.go b/events/events.go index 6f0b529e5..e7b1c633b 100644 --- a/events/events.go +++ b/events/events.go @@ -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() }