-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
feat(client): add poison to Connected #3145
Merged
Merged
+47
−0
Conversation
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
Add `poison` method to `Connected`. This allows callers to mark a connection as poisoned which prevents the pool from reusing it on subsequent requests. `is_open` will consider poisoning prior to returning a connection to the pool.
seanmonstar
approved these changes
Feb 16, 2023
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.
LGTM!
oddgrd
pushed a commit
to oddgrd/hyper
that referenced
this pull request
Mar 7, 2023
Add `poison` method to `Connected`. This allows callers to mark a connection as poisoned which prevents the pool from reusing it on subsequent requests. `is_open` will consider poisoning prior to returning a connection to the pool.
bors bot
referenced
this pull request
in TeamHarTex/HarTex
Mar 10, 2023
683: Update Rust crate hyper to 0.14.25 r=HTG-YT a=renovate[bot] [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [hyper](https://hyper.rs) ([source](https://github.com/hyperium/hyper)) | dependencies | patch | `0.14.24` -> `0.14.25` | --- ### Release Notes <details> <summary>hyperium/hyper</summary> ### [`v0.14.25`](https://github.com/hyperium/hyper/releases/tag/v0.14.25) [Compare Source](https://github.com/hyperium/hyper/compare/v0.14.24...v0.14.25) #### Features - **client:** - deprecate `client::conn` types ([#​3156](https://github.com/hyperium/hyper/issues/3156)) ([0ced15d3](https://github.com/hyperium/hyper/commit/0ced15d3cc10ace477ebda13ead8e6857b51867e)) - add 1.0 compatible client conn API ([#​3155](https://github.com/hyperium/hyper/issues/3155)) ([253cc74d](https://github.com/hyperium/hyper/commit/253cc74d86b082067aa884a0a63a089d7d19401d), closes [#​3053](https://github.com/hyperium/hyper/issues/3053)) - add `client::connect::capture_connection()` ([#​3144](https://github.com/hyperium/hyper/issues/3144)) ([c8493399](https://github.com/hyperium/hyper/commit/c8493399b2929a86f3020ae77304a00e43cfd161)) - add `poison` to `Connected` ([#​3145](https://github.com/hyperium/hyper/issues/3145)) ([37ed5a2e](https://github.com/hyperium/hyper/commit/37ed5a2e3cab76a11092823a80afd8fe2f2a9693)) - **server:** - deprecate server conn structs ([#​3161](https://github.com/hyperium/hyper/issues/3161)) ([02fe20f2](https://github.com/hyperium/hyper/commit/02fe20f232a7c3cf24d505b121ce4d428a93254d)) - backport the split server conn modules from 1.0 ([#​3102](https://github.com/hyperium/hyper/issues/3102)) ([84881c9e](https://github.com/hyperium/hyper/commit/84881c9e5160167a89d18d30c0ef6856dc859839), closes [#​3079](https://github.com/hyperium/hyper/issues/3079)) - remove some `Unpin` and `'static` constraints ([#​3119](https://github.com/hyperium/hyper/issues/3119)) ([0368a41a](https://github.com/hyperium/hyper/commit/0368a41a6cc1a5c6f1eada0d88e38b7dce261587)) #### New Contributors - [`@​rcoh](https://github.com/rcoh)` made their first contribution in [https://github.com/hyperium/hyper/pull/3145](https://github.com/hyperium/hyper/pull/3145) - [`@​iamwwc](https://github.com/iamwwc)` made their first contribution in [https://github.com/hyperium/hyper/pull/3119](https://github.com/hyperium/hyper/pull/3119) </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/TeamHarTex/HarTex). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNC4xNjAuMCIsInVwZGF0ZWRJblZlciI6IjM0LjE2MC4wIn0=--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
bors bot
referenced
this pull request
in OpenPoolProject/stratum
Mar 11, 2023
505: chore(deps): update github/codeql-action action to v2.2.6 r=renovate[bot] a=renovate[bot] [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [github/codeql-action](https://github.com/github/codeql-action) | action | patch | `v2.2.5` -> `v2.2.6` | --- ### Release Notes <details> <summary>github/codeql-action</summary> ### [`v2.2.6`](https://github.com/github/codeql-action/compare/v2.2.5...v2.2.6) [Compare Source](https://github.com/github/codeql-action/compare/v2.2.5...v2.2.6) </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/OpenPoolProject/stratum). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNC4xNjAuMCIsInVwZGF0ZWRJblZlciI6IjM0LjE2MC4wIn0=--> 506: fix(deps): update rust crate hyper to 0.14.25 r=renovate[bot] a=renovate[bot] [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [hyper](https://hyper.rs) ([source](https://github.com/hyperium/hyper)) | dependencies | patch | `0.14.24` -> `0.14.25` | --- ### Release Notes <details> <summary>hyperium/hyper</summary> ### [`v0.14.25`](https://github.com/hyperium/hyper/releases/tag/v0.14.25) [Compare Source](https://github.com/hyperium/hyper/compare/v0.14.24...v0.14.25) #### Features - **client:** - deprecate `client::conn` types ([#​3156](https://github.com/hyperium/hyper/issues/3156)) ([0ced15d3](https://github.com/hyperium/hyper/commit/0ced15d3cc10ace477ebda13ead8e6857b51867e)) - add 1.0 compatible client conn API ([#​3155](https://github.com/hyperium/hyper/issues/3155)) ([253cc74d](https://github.com/hyperium/hyper/commit/253cc74d86b082067aa884a0a63a089d7d19401d), closes [#​3053](https://github.com/hyperium/hyper/issues/3053)) - add `client::connect::capture_connection()` ([#​3144](https://github.com/hyperium/hyper/issues/3144)) ([c8493399](https://github.com/hyperium/hyper/commit/c8493399b2929a86f3020ae77304a00e43cfd161)) - add `poison` to `Connected` ([#​3145](https://github.com/hyperium/hyper/issues/3145)) ([37ed5a2e](https://github.com/hyperium/hyper/commit/37ed5a2e3cab76a11092823a80afd8fe2f2a9693)) - **server:** - deprecate server conn structs ([#​3161](https://github.com/hyperium/hyper/issues/3161)) ([02fe20f2](https://github.com/hyperium/hyper/commit/02fe20f232a7c3cf24d505b121ce4d428a93254d)) - backport the split server conn modules from 1.0 ([#​3102](https://github.com/hyperium/hyper/issues/3102)) ([84881c9e](https://github.com/hyperium/hyper/commit/84881c9e5160167a89d18d30c0ef6856dc859839), closes [#​3079](https://github.com/hyperium/hyper/issues/3079)) - remove some `Unpin` and `'static` constraints ([#​3119](https://github.com/hyperium/hyper/issues/3119)) ([0368a41a](https://github.com/hyperium/hyper/commit/0368a41a6cc1a5c6f1eada0d88e38b7dce261587)) #### New Contributors - [`@​rcoh](https://github.com/rcoh)` made their first contribution in [https://github.com/hyperium/hyper/pull/3145](https://github.com/hyperium/hyper/pull/3145) - [`@​iamwwc](https://github.com/iamwwc)` made their first contribution in [https://github.com/hyperium/hyper/pull/3119](https://github.com/hyperium/hyper/pull/3119) </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/OpenPoolProject/stratum). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNC4xNjAuMCIsInVwZGF0ZWRJblZlciI6IjM0LjE2MC4wIn0=--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
bors bot
referenced
this pull request
in OpenPoolProject/stratum
Mar 11, 2023
506: fix(deps): update rust crate hyper to 0.14.25 r=renovate[bot] a=renovate[bot] [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [hyper](https://hyper.rs) ([source](https://github.com/hyperium/hyper)) | dependencies | patch | `0.14.24` -> `0.14.25` | --- ### Release Notes <details> <summary>hyperium/hyper</summary> ### [`v0.14.25`](https://github.com/hyperium/hyper/releases/tag/v0.14.25) [Compare Source](https://github.com/hyperium/hyper/compare/v0.14.24...v0.14.25) #### Features - **client:** - deprecate `client::conn` types ([#​3156](https://github.com/hyperium/hyper/issues/3156)) ([0ced15d3](https://github.com/hyperium/hyper/commit/0ced15d3cc10ace477ebda13ead8e6857b51867e)) - add 1.0 compatible client conn API ([#​3155](https://github.com/hyperium/hyper/issues/3155)) ([253cc74d](https://github.com/hyperium/hyper/commit/253cc74d86b082067aa884a0a63a089d7d19401d), closes [#​3053](https://github.com/hyperium/hyper/issues/3053)) - add `client::connect::capture_connection()` ([#​3144](https://github.com/hyperium/hyper/issues/3144)) ([c8493399](https://github.com/hyperium/hyper/commit/c8493399b2929a86f3020ae77304a00e43cfd161)) - add `poison` to `Connected` ([#​3145](https://github.com/hyperium/hyper/issues/3145)) ([37ed5a2e](https://github.com/hyperium/hyper/commit/37ed5a2e3cab76a11092823a80afd8fe2f2a9693)) - **server:** - deprecate server conn structs ([#​3161](https://github.com/hyperium/hyper/issues/3161)) ([02fe20f2](https://github.com/hyperium/hyper/commit/02fe20f232a7c3cf24d505b121ce4d428a93254d)) - backport the split server conn modules from 1.0 ([#​3102](https://github.com/hyperium/hyper/issues/3102)) ([84881c9e](https://github.com/hyperium/hyper/commit/84881c9e5160167a89d18d30c0ef6856dc859839), closes [#​3079](https://github.com/hyperium/hyper/issues/3079)) - remove some `Unpin` and `'static` constraints ([#​3119](https://github.com/hyperium/hyper/issues/3119)) ([0368a41a](https://github.com/hyperium/hyper/commit/0368a41a6cc1a5c6f1eada0d88e38b7dce261587)) #### New Contributors - [`@​rcoh](https://github.com/rcoh)` made their first contribution in [https://github.com/hyperium/hyper/pull/3145](https://github.com/hyperium/hyper/pull/3145) - [`@​iamwwc](https://github.com/iamwwc)` made their first contribution in [https://github.com/hyperium/hyper/pull/3119](https://github.com/hyperium/hyper/pull/3119) </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/OpenPoolProject/stratum). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNC4xNjAuMCIsInVwZGF0ZWRJblZlciI6IjM0LjE2MC4wIn0=--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
seanmonstar
pushed a commit
to hyperium/hyper-util
that referenced
this pull request
Aug 6, 2024
This is a port of hyperium/hyper#3145 from hyper v0.14.x. It introduces a PoisonPill atomic onto connection info. When set to true, this prevents the connection from being returned to the pool.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Add
poison
method toConnected
. This allows callers to mark a connection as poisoned which prevents the pool from reusing it on subsequent requests.is_open
will consider poisoning prior to returning a connection to the pool.