Verified Commit d7395247 authored byBrowse files
Fix deadlock caused by accumulating events.
So far, bridgestrap would only consume Tor's controller events from c.eventChan as long as the main execution flow was in TestBridgeLines. Outside of that function, controller events would keep on coming but not be consumed. That worked fine for a while because c.eventChan has a buffer of 100 events but occasionally it would result in the buffer filling up, which would cause a deadlock because bulb, our controller library, would block on sending bridgestrap its events. This patch fixes the issue by also consuming events outside of TestBridgeLines. The patch further adds a new Prometheus time series called pending_events, which captures the number of pending events. The time series will help us monitor if this patch got the job done.
Showing with 37 additions and 15 deletions