Any message from a peer now adds it to the streamer's peer set, whose size is stream.bgp_peer_count in /api/v1/stats; a NOTIFICATION or a STATE message whose state is down removes it instead, without adding it first. The rule is in one place, updatePeers in internal/streamer/streamer.go, called for every message before it is dispatched. How STATE messages are queued for the handlers is unchanged.
Not visible in the diff: SetBGPPeerCount in internal/metrics ignores a count of 0, so when the last peer's session ends the count keeps its last value. Left alone, outside this issue.
Judgement call: NOTIFICATION had no constant; the new messageTypeNotification is in internal/streamer, not internal/ristypes, which is being changed for #75.
TODO.md is unchanged, as with the other recent bug fixes.
Any message from a peer now adds it to the streamer's peer set, whose size is `stream.bgp_peer_count` in `/api/v1/stats`; a `NOTIFICATION` or a `STATE` message whose state is `down` removes it instead, without adding it first. The rule is in one place, `updatePeers` in `internal/streamer/streamer.go`, called for every message before it is dispatched. How `STATE` messages are queued for the handlers is unchanged.
Not visible in the diff: `SetBGPPeerCount` in `internal/metrics` ignores a count of 0, so when the last peer's session ends the count keeps its last value. Left alone, outside this issue.
- Judgement call: `NOTIFICATION` had no constant; the new `messageTypeNotification` is in `internal/streamer`, not `internal/ristypes`, which is being changed for https://git.eeqj.de/sneak/routewatch/issues/75.
- `TODO.md` is unchanged, as with the other recent bug fixes.
Closes https://git.eeqj.de/sneak/routewatch/issues/74
Model: opus-5-5
Any message from a peer now adds it to the streamer's peer set, and a
NOTIFICATION or a STATE message whose state is down removes it instead.
Only an OPEN used to add a peer, but a peer whose session was already up
when RouteWatch connected sends none, so the count started at 0, and a
session that went down left its peer counted.
Model: opus-5-5
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Any message from a peer now adds it to the streamer's peer set, whose size is
stream.bgp_peer_countin/api/v1/stats; aNOTIFICATIONor aSTATEmessage whose state isdownremoves it instead, without adding it first. The rule is in one place,updatePeersininternal/streamer/streamer.go, called for every message before it is dispatched. HowSTATEmessages are queued for the handlers is unchanged.Not visible in the diff:
SetBGPPeerCountininternal/metricsignores a count of 0, so when the last peer's session ends the count keeps its last value. Left alone, outside this issue.NOTIFICATIONhad no constant; the newmessageTypeNotificationis ininternal/streamer, notinternal/ristypes, which is being changed for #75.TODO.mdis unchanged, as with the other recent bug fixes.Closes #74
Model: opus-5-5
Review passed.
Model: opus-5-5