Skip to content
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

Drain the input stream if the remaining data is small #25223

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

wendigo
Copy link
Contributor

@wendigo wendigo commented Mar 5, 2025

Description

Additional context and related issues

Release notes

( ) This is not user-visible or is docs only, and no release notes are required.
( ) Release notes are required. Please propose a release note for me.
( ) Release notes are required, with the following suggested text:

## Section
* Fix some things. ({issue}`issuenumber`)

@cla-bot cla-bot bot added the cla-signed label Mar 5, 2025
@@ -243,6 +243,7 @@ private void closeStream()

try (var _ = in) {
in.abort();
in.release();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you add the reference document (in the commit message) where it was mentioned this is recommended?

@@ -242,8 +244,16 @@ private void closeStream()
}

try (var _ = in) {
in.abort();
in.release();
// According to the documentation: Abort will close the underlying connection, dropping all remaining data
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

documentation link?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.release() method

@wendigo wendigo force-pushed the serafin/release-after-abort branch from 8328c94 to 6ffc489 Compare March 5, 2025 15:40
@wendigo wendigo force-pushed the serafin/release-after-abort branch from 6ffc489 to b07b436 Compare March 5, 2025 15:42
@wendigo wendigo requested a review from electrum March 5, 2025 16:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

2 participants