Fixed bug in pooling:

Due to missing reference count incrementation the default configuration
was removed/overwritten.
This commit is contained in:
Georg Richter
2020-11-22 20:38:26 +01:00
parent 5ef5008c68
commit fab2a6d810

View File

@ -409,6 +409,7 @@ static PyObject
}
}
self->configuration= kwargs;
Py_INCREF(self->configuration);
Py_RETURN_NONE;
}
@ -444,9 +445,9 @@ MrdbPool_addconnection(MrdbPool *self, PyObject *args)
{
if (!self->connection[i])
{
if (!conn &&
(!(conn = (MrdbConnection *)MrdbConnection_connect(NULL, args,
self->configuration))))
if (!conn &&
!(conn = (MrdbConnection *)MrdbConnection_connect(NULL, args,
self->configuration)))
{
pthread_mutex_unlock(&self->lock);
return NULL;