forked from scylladb/seastar
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
http/client: Respect user-provided timeout
There are two places that can wait for undefined amount of time -- the one that waits the connection pool to release a connection and the one that establishes a new connection. The former is simple, as it uses conditional variable, so just wait() on it with the timeout and return back timeout error if it fired. Tha latter is trickier. New connections come from factory and it's not guaranteed that a factory obeys it (e.g. see scylladb#2302). So instead of relying on the factory, check if connected_socket appeared soon enough and return back timeout error if it didn't. Signed-off-by: Pavel Emelyanov <[email protected]>
- Loading branch information
Showing
2 changed files
with
29 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters