-
Notifications
You must be signed in to change notification settings - Fork 66
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
Avoid retrying on IO errors when it’s unclear if the server received the request #2479
Changes from 2 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 |
---|---|---|
|
@@ -83,7 +83,7 @@ macro_rules! reconnect_if_dropped { | |
macro_rules! reconnect_if_io_error { | ||
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. nit: macro should be renamed to reflect the change: e.g. 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. i'll change it, but in a different PR we need to remove this whole file - we have no use in redis-rs's connection_manager |
||
($self:expr, $result:expr, $current:expr) => { | ||
if let Err(e) = $result { | ||
if e.is_io_error() { | ||
if e.is_connection_dropped() { | ||
$self.reconnect($current); | ||
} | ||
return Err(e); | ||
|
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.
Nice catch 👍🏽