mirror of
https://github.com/element-hq/dendrite.git
synced 2025-09-14 05:12:26 +03:00
Apply suggestions from code review
This commit is contained in:
parent
85e7caf285
commit
8eae253e43
1 changed files with 2 additions and 0 deletions
|
@ -102,6 +102,7 @@ type worker struct {
|
||||||
subscription *nats.Subscription
|
subscription *nats.Subscription
|
||||||
sentryHub *sentry.Hub
|
sentryHub *sentry.Hub
|
||||||
ephemeralSeq uint64
|
ephemeralSeq uint64
|
||||||
|
// last seq we fully processed
|
||||||
durableSeq uint64
|
durableSeq uint64
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -306,6 +307,7 @@ func (w *worker) _next() {
|
||||||
// from the queue. In which case, we'll shut down the subscriber
|
// from the queue. In which case, we'll shut down the subscriber
|
||||||
// and wait to be notified about new room activity again. Maybe
|
// and wait to be notified about new room activity again. Maybe
|
||||||
// the problem will be corrected by then.
|
// the problem will be corrected by then.
|
||||||
|
// atomically clear the subscription and unsubscribe
|
||||||
w.Lock()
|
w.Lock()
|
||||||
|
|
||||||
logrus.WithError(err).Errorf("Failed to get next stream message for room %q", w.roomID)
|
logrus.WithError(err).Errorf("Failed to get next stream message for room %q", w.roomID)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue