mirror of
https://github.com/PyMySQL/mysqlclient.git
synced 2025-08-16 12:27:03 +08:00
Fix connection leak
This commit is contained in:
@ -640,8 +640,9 @@ _mysql_ConnectionObject_close(
|
|||||||
_mysql_ConnectionObject *self,
|
_mysql_ConnectionObject *self,
|
||||||
PyObject *args)
|
PyObject *args)
|
||||||
{
|
{
|
||||||
if (!args) return NULL;
|
if (args) {
|
||||||
if (!PyArg_ParseTuple(args, "")) return NULL;
|
if (!PyArg_ParseTuple(args, "")) return NULL;
|
||||||
|
}
|
||||||
if (self->open) {
|
if (self->open) {
|
||||||
Py_BEGIN_ALLOW_THREADS
|
Py_BEGIN_ALLOW_THREADS
|
||||||
mysql_close(&(self->connection));
|
mysql_close(&(self->connection));
|
||||||
|
Reference in New Issue
Block a user