Skip to content

Commit

Permalink
Fix for CONPY-82:
Browse files Browse the repository at this point in the history
If attempt to add a new connection fails, we need to unlock the mutex before returning error.
  • Loading branch information
9EOR9 committed Jun 24, 2020
1 parent 2ee51a0 commit 1a1b033
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/mariadb_pooling.c
Expand Up @@ -474,6 +474,7 @@ MrdbPool_addconnection(MrdbPool *self, PyObject *args)
(!(conn = (MrdbConnection *)MrdbConnection_connect(NULL, args,
self->configuration))))
{
pthread_mutex_unlock(&self->lock);
return NULL;
}
Py_INCREF(conn);
Expand Down

0 comments on commit 1a1b033

Please sign in to comment.