-
Notifications
You must be signed in to change notification settings - Fork 2
add reconnection logic [CPP-371] #178
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
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.
Changes look good but we have quite a lot of thread::spawn calls now (which may be unavoidable given our architecture)-- can we create a diagram with draw.io that details how these threads interact? We should detail if threads are meant to be ephemeral or if they're long lived too.
| .log_errors(log::Level::Debug) | ||
| .with_rover_time() | ||
| impl Messages { | ||
| const TIMEOUT: Duration = Duration::from_secs(30); |
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.
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.
Hmm strange, for me when I disconnect the vpn it triggers an error from the underlying tcp connection saying Resource temporarily unavailable (os error 11). Similar thing happens if I just disable wifi, haven't actually figured out a way to simulate no messages for 30 seconds without the io resource just returning an error itself
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.
Should be able to chain two socat instances together, one connected to the Piksi, connect another socat to the Piksi socat, console connects to this one, then kill the one connected to the Piksi.
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.
Any luck on reproducing this?
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.
No I just got another io error, BrokenPipe. I'm trying to shorten the timeout and then throttle my internet but that doesn't appear to work either
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.
Actually that does trigger the timeout for me, then after un-throttling it reconnects
de4b26f to
8d4db6e
Compare
|
@silverjam Added a diagram of the backend threads. Not really sure how one typically draws something like this but for what I have each bar represents a thread. The left -> right layout represents parent/child relationships between threads. @john-michaelburke does this seem accurate to you? |
8d4db6e to
b0a12dd
Compare
Looks great, thanks |


No description provided.