-
Notifications
You must be signed in to change notification settings - Fork 1
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
fix rmb calls timeout #202
Conversation
How we tested our approch: first we ran an rmb-relay locally on my device on a successful runs connecting to the chain we started another rmb-peer connected to the local relay the redis database shows a successful change after that I managed to cut the relay connections to the chain in another remote device I ran rmb-peer with different twin id and changed the relay to a local relay then I released block on the connection in the previous step and it catches the peer change in the relay |
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.
The changes introduce valuable improvements overall. However, the loop remains infinite without external exit control or mechanisms such as a termination or shutdown signal. Upon reviewing the code base, it appears that the RMB relay lacks a fully implemented graceful shutdown mechanism:
- The main relay server loop in src/relay/mod.rs runs in an infinite loop without handling shutdown.
- The federation worker also operates in an infinite loop without shutdown handling.
- The event listener in this PR similarly lacks shutdown handling.
I recommend implementing proper graceful shutdown handling to ensure reliable operation. However, it would be more reasonable to address this in a separate PR.
Signed-off-by: nabil salah <nabil.salah203@gmail.com>
97dd809
to
649e2e0
Compare
Signed-off-by: nabil salah <nabil.salah203@gmail.com>
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.
good job ya nabil, i have small comments
i tired and it do retry with backoff, but can we extend the timeout? maybe 5 min |
Signed-off-by: nabil salah <nabil.salah203@gmail.com>
Description
added exponential backoff and app exit when the listener thread is down
Changes
src/bins/rmb-relay.rs
fileRelated Issues
issue#200
Checklist