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

Leaked TCP connection when connection to DB wasn't completed #243

Open
lexas2509 opened this issue Mar 10, 2025 · 0 comments
Open

Leaked TCP connection when connection to DB wasn't completed #243

lexas2509 opened this issue Mar 10, 2025 · 0 comments

Comments

@lexas2509
Copy link

Describe the bug
We observed leaked TCP connection when attempts to establish connection are unsuccesful

To Reproduce
n/a

Expected behavior
Underlying TCP connection released if database connection is failed to establish

Additional context
Similar to:

there are other case when TCP connection can be leaked, see below

If TCP connection was successfully created in dialConnection, but there is failure in succeeding action then TCP keeps open and effectively leaked.

Some code points where this connection can be leak:
573423d#diff-03d2022a494bc442893aa7389ad6f08e1003ef9d858972b0daec68b6c2950366L1203

573423d#diff-03d2022a494bc442893aa7389ad6f08e1003ef9d858972b0daec68b6c2950366L1229

573423d#diff-03d2022a494bc442893aa7389ad6f08e1003ef9d858972b0daec68b6c2950366L1234

and many others return nil, err effectively lead to leaked TCP connection.

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

No branches or pull requests

1 participant