-
Notifications
You must be signed in to change notification settings - Fork 40
Keep state consistent during disconnection #729
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -233,6 +233,9 @@ pub(super) fn event_effect(store: &mut crate::redux::Store, event: P2pEvent) -> | |
) | ||
} | ||
} | ||
MioEvent::ConnectionDidCloseOnDemand(addr) => { | ||
SubStore::dispatch(store, P2pNetworkSchedulerAction::Prune { addr }) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. maybe u should dispatch There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In fact I'd put There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It is too big change and require more debugging to make it work properly. Let's allow connection where |
||
} | ||
}, | ||
_ => false, | ||
} | ||
|
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.
If it gets insta finished, without any event from mio, then disconnecting state seems useless.
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.
Let's keep it for further improvement. I will make
Finish
an effect ofPrune
, but not now.