We were adding an overflow marker on every message above capacity, not
just the first, vitiating the purpose of the bound. The shame, the
shame.
Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
} else if (capacity && notifications.size() >= capacity) {
// We are allowed one over, so the client knows where in the
// sequence of notifications we started losing data.
- notifications.push({errc::notification_overflow, {}});
+ if (notifications.size() == capacity) {
+ notifications.push({errc::notification_overflow, {}});
+ }
} else {
notifications.push({{},
Notification{