-
Notifications
You must be signed in to change notification settings - Fork 8
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 lost connection objects acquired from mysql.connect() #31
Comments
This was referenced Nov 22, 2019
I've checked. Connection doesn't leak actually. Line 529 in 6f785f7
|
How about a test that checks that a file descriptor actually closed? |
romanhabibov
added a commit
that referenced
this issue
Nov 11, 2020
romanhabibov
added a commit
that referenced
this issue
Nov 12, 2020
romanhabibov
added a commit
that referenced
this issue
Nov 16, 2020
romanhabibov
added a commit
that referenced
this issue
Nov 17, 2020
romanhabibov
added a commit
that referenced
this issue
Nov 18, 2020
LeonidVas
pushed a commit
that referenced
this issue
Nov 19, 2020
romanhabibov
added a commit
that referenced
this issue
Dec 11, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When a connection is acquired from a pool, lost and collected by Lua GC, its underlying connection will be closed from a GC callback. A connection that is created directly w/o a pool using
mysql.connect()
has no such GC callback, so its underlying connection will not be properly closed if a user does not call<connection object>:close()
manually.A fiber may store a connection in its local variable. If this fiber does not handle abnormal exit properly and, say, does not close the connection when is hit by fiber.cancel(), the underlying connection will leak.
We should test than the underlying connection is closed in the case.
The text was updated successfully, but these errors were encountered: