Skip to content

Conversation

@lbguilherme
Copy link

Fix #2907 by removing the delay of ending the connection normally, as this is an error condition.

@brianc
Copy link
Owner

brianc commented Feb 8, 2023

Thanks for this PR! I really appreciate it. Would it be possible to include a test? With github issues like #2907 sometimes I just make a file here with the issue number and you can basically copy/paste the code that's supposed to cleanly exit into the file...if the file never exits the test is considered a failure so it'd be a quick way to create a test for this in the future. If you don't want to run the full test suite locally you can run any individual file in the suite with node packages/pg/test/integration/gh-issues/2907-tests.js for example. pg was written before any of the now popular node test frameworks existed so the tests are basically each file is a self-contained script which must exit with 0 or the test suite is a fail, so its easy to just run one test (or file full of tests) at a time.

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.

Connection failure leaks an open socket

2 participants