-
Notifications
You must be signed in to change notification settings - Fork 374
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor DisconnectingState::handle_commands
#7664
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very nice cleanup!
Reviewable status: 0 of 1 files reviewed, 1 unresolved discussion
talpid-core/src/tunnel_state_machine/disconnecting_state.rs
line 60 at r1 (raw file):
Some(TunnelCommand::Connectivity(connectivity)) => { shared_values.connectivity = connectivity; if !connectivity.is_offline() {
I think the logic was modified a bit here: If connectivity.is_offline() && matches!(_, AfterDisconnect::Reconnect(_))
, should it not switch to AfterDisconnect::Block(_)
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 1 of 1 files at r1, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @Serock3)
79b8770
to
70c4505
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 0 of 1 files reviewed, all discussions resolved (waiting on @dlon)
talpid-core/src/tunnel_state_machine/disconnecting_state.rs
line 60 at r1 (raw file):
Previously, dlon (David Lönnhager) wrote…
I think the logic was modified a bit here: If
connectivity.is_offline() && matches!(_, AfterDisconnect::Reconnect(_))
, should it not switch toAfterDisconnect::Block(_)
?
Good catch!
70c4505
to
2439367
Compare
2439367
to
a8523e2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 1 of 1 files at r3, all commit messages.
Reviewable status:complete! all files reviewed, all discussions resolved
Refactor
DisconnectingState::handle_commands
to reduce code duplication.This change is