Skip to content

daemon: make PeerFsmOutput::CloseConnection a unit variant#356

Merged
fujita merged 1 commit into
osrg:masterfrom
fujita:remove-close-connection-payload
May 18, 2026
Merged

daemon: make PeerFsmOutput::CloseConnection a unit variant#356
fujita merged 1 commit into
osrg:masterfrom
fujita:remove-close-connection-payload

Conversation

@fujita
Copy link
Copy Markdown
Member

@fujita fujita commented May 18, 2026

The Role payload was never read — all match arms in both event.rs and fsm.rs tests used CloseConnection(_). CloseConnection is only returned by on_connected() for the same role that was passed in, so the driver already knows the role from PeerSession::self.role.

Remove the payload and the now-unnecessary #[allow(dead_code)] on PeerFsmOutput.

Assisted-by: Claude Sonnet 4.6 noreply@anthropic.com

The Role payload was never read — all match arms in both event.rs and
fsm.rs tests used CloseConnection(_).  CloseConnection is only returned
by on_connected() for the same role that was passed in, so the driver
already knows the role from PeerSession::self.role.

Remove the payload and the now-unnecessary #[allow(dead_code)] on
PeerFsmOutput.

Assisted-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@gmail.com>
@fujita fujita merged commit 5a0835e into osrg:master May 18, 2026
3 checks passed
@fujita fujita deleted the remove-close-connection-payload branch May 18, 2026 21:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant