This repository has been archived by the owner on Sep 24, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 73
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Wait for a pending connection when acquiring
There are two cases when a caller might ask for a connection when the only available ones are in a pending state: - Upon initialization, if the caller hasn't waited for `connect()` to complete. - After all connections to the database are lost, and they are reconnecting. Instead of immediately returning an error to the caller, add them to the waiting queue, allowing them to either get a connection, or return an error if none of the pending connections succeed.
- Loading branch information
Showing
2 changed files
with
73 additions
and
4 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