-
Notifications
You must be signed in to change notification settings - Fork 173
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
RUST-360 Guard connection establishment by connectTimeoutMS #743
RUST-360 Guard connection establishment by connectTimeoutMS #743
Conversation
@@ -198,16 +197,6 @@ impl Monitor { | |||
// Otherwise, just use connectTimeoutMS. | |||
self.connect_timeout() | |||
}; | |||
let timeout_future = async { |
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.
This was moved into the runtime
module.
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.
LG! One small comment only.
src/cmap/establish/mod.rs
Outdated
@@ -59,14 +65,29 @@ impl ConnectionEstablisher { | |||
None | |||
}; | |||
|
|||
let connect_timeout = if let Some(timeout) = options.connect_timeout { |
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.
Nit: I think this might be easier to read as a match against Some(0)
, Some(n)
, and None
.
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 idea, done. I had to do it a little bit different since we're matching on a Duration
, but I still think it's more readable than before.
In #721, I moved around a lot of the logic for enforcing
connectTimeoutMS
and inadvertently removed it from the operation connection establishment code path. This PR adds it back in.