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

Destroy connection if the server does not support SSL #2908

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

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