Apply suggestions from code review

This commit is contained in:
Kegan Dougal 2025-08-12 11:53:02 +01:00 committed by GitHub
parent 85e7caf285
commit 8eae253e43
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -102,6 +102,7 @@ type worker struct {
subscription *nats.Subscription
sentryHub *sentry.Hub
ephemeralSeq uint64
// last seq we fully processed
durableSeq uint64
}
@ -306,6 +307,7 @@ func (w *worker) _next() {
// from the queue. In which case, we'll shut down the subscriber
// and wait to be notified about new room activity again. Maybe
// the problem will be corrected by then.
// atomically clear the subscription and unsubscribe
w.Lock()
logrus.WithError(err).Errorf("Failed to get next stream message for room %q", w.roomID)