mirror of
https://github.com/psycopg/psycopg2.git
synced 2025-03-03 15:45:46 +03:00
Dropped redundant check on the status before rollback
The check is better done inside the critical section.
This commit is contained in:
parent
5fcbe7bd0f
commit
4eea8bc912
|
@ -513,11 +513,6 @@ pq_abort(connectionObject *conn)
|
|||
Dprintf("pq_abort: pgconn = %p, autocommit = %d, status = %d",
|
||||
conn->pgconn, conn->autocommit, conn->status);
|
||||
|
||||
if (conn->autocommit || conn->status != CONN_STATUS_BEGIN) {
|
||||
Dprintf("pq_abort: no transaction to abort");
|
||||
return 0;
|
||||
}
|
||||
|
||||
Py_BEGIN_ALLOW_THREADS;
|
||||
pthread_mutex_lock(&conn->lock);
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user