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 panic in Pipeline when PgConn is busy or closed #1837

Merged
merged 1 commit into from
Dec 23, 2023

Conversation

ryanfowler
Copy link
Contributor

Fixes #1827

In the current implementation, if a Pipeline is created with an error due to the connection being busy/closed, calling Sync on that Pipeline will result in a nil dereference panic. An example of where this behaviour can be seen is here.

This PR adds a check to the start of the Sync method to return an error if the Pipeline is "closed".

@jackc jackc merged commit dfd1980 into jackc:master Dec 23, 2023
14 checks passed
@jackc
Copy link
Owner

jackc commented Dec 23, 2023

Thanks! Good catch.

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.

Panic during QueryRow
2 participants