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

Fix EndRead throwing exceptions when a stream is active #5454

Merged
merged 2 commits into from Nov 28, 2023

Conversation

NinoFloris
Copy link
Member

Check whether a stream is active before throwing unconsumed exception.

This does not affect GetStream() as we're implementing that intrinsically (i.e. without converters, so no Start/EndRead).

Fixes #5450

Copy link
Member

@roji roji left a comment

Choose a reason for hiding this comment

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

LGTM

src/Npgsql/Internal/PgReader.cs Show resolved Hide resolved
@NinoFloris NinoFloris enabled auto-merge (squash) November 28, 2023 23:26
@NinoFloris NinoFloris merged commit 42ea28f into main Nov 28, 2023
16 checks passed
@NinoFloris NinoFloris deleted the fix-endread-stream-active branch November 28, 2023 23:32
NinoFloris added a commit that referenced this pull request Nov 28, 2023
@NinoFloris
Copy link
Member Author

Backported to 8.0.1 via 1d070a5

JonasWestman pushed a commit to monitor-erp/npgsql that referenced this pull request Dec 20, 2023
Fixes npgsql#5450

(cherry picked from commit 42ea28f)
Signed-off-by: monjowe <jonas.westman@monitor.se>
JonasWestman pushed a commit to monitor-erp/npgsql that referenced this pull request Dec 21, 2023
Fixes npgsql#5450

(cherry picked from commit 42ea28f)
Signed-off-by: monjowe <jonas.westman@monitor.se>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

PgReader.GetTextReader with size > 65536 fails
2 participants