Skip to content

Conversation

@0xTim
Copy link
Member

@0xTim 0xTim commented Dec 9, 2020

Correctly close the PostgreSQL connection if requestTLS fails.

Resolves #133

@0xTim 0xTim requested a review from gwynne December 9, 2020 17:57
Copy link
Member

@gwynne gwynne left a comment

Choose a reason for hiding this comment

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

LGTM; I'd like to see a test, but the change is very straightforward and a meaningful test might be difficult enough to construct that I'm (more or less) okay without one. Please do add one if you can, though.

@0xTim 0xTim requested a review from gwynne December 10, 2020 00:39
@0xTim
Copy link
Member Author

0xTim commented Dec 10, 2020

@gwynne test added. Remove the fix, tests crash. Add fix, tests pass

@0xTim 0xTim merged commit 2808c4f into master Dec 10, 2020
@0xTim 0xTim deleted the request-tls-fail-connection-leak branch December 10, 2020 01:36
@tanner0101
Copy link
Member

These changes are now available in 1.4.1

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.

If requestTLS fails, a PostgresConnection will be leaked, which asserts.

3 participants