forked from denisenkom/go-mssqldb
-
Notifications
You must be signed in to change notification settings - Fork 68
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
connection not closed when database name is incorrect #173
Comments
I have figths with a open connections for a while in my app and found that such case also applicable for the cases when user don't have access to DB. |
parMaster
added a commit
to parMaster/go-mssqldb
that referenced
this issue
Oct 9, 2024
parMaster
added a commit
to parMaster/go-mssqldb
that referenced
this issue
Oct 11, 2024
shueybubbles
pushed a commit
that referenced
this issue
Oct 14, 2024
…224) * connection not closed when database name is incorrect #173 fix * test for leaked connections (connection not closed when database name is incorrect #173 * Checking the number of open connections from local_net_address only * using sql.NullString for localNetAddr * handling local_net_address==NULL correctly
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Opened same issue in original over at denisenkom#798 and found this fork which seems to be more active however upon updating the package looks like the issue exists with this package as well
Describe the bug
If a database name is provided that does not exist, we get back an error however even though
db.Close()
is executed the network connection still remains open.To Reproduce
If you provide a database name that exists then should see the following, before sending the exit signal if you look for connections to the database it will be in
TIME_WAIT
However if you provide a database name that does not exist then the connection remains
ESTABLISHED
even though it should have been closed.Expected behavior
The network connection should be closed
Further technical details
SQL Server version: docker image mcr.microsoft.com/mssql/server:2022-latest
Operating system: macOS 13.6.3
The text was updated successfully, but these errors were encountered: