-
Notifications
You must be signed in to change notification settings - Fork 207
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
feat(net): add Magicsock::network_change
#1845
Conversation
This allows notifying `iroh-net` when the network has likely changed. Usually this is only needed on android, as on all other OSes this is automatically detected.
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.
Tested with Android, switching between LTE and Wi-Fi works now on deltachat/deltachat-core-rust#5041
Is it fine to call this on non-Android platforms as well because it is debounced anyway? If both the iroh-using app and iroh detect network change, this would not result in double STUN request, right? |
It should be fine now, yes. The original version I had would not have been, but now that it is fed properly through the internal detector, feel free to call it unconditionally |
Co-authored-by: Floris Bruynooghe <[email protected]>
Co-authored-by: link2xt <[email protected]>
This allows notifying
iroh-net
when the network has likely changed.Usually this is only needed on android, as on all other OSes this is automatically detected.