Dropped redundant check on the status before rollback

The check is better done inside the critical section.
This commit is contained in:
Daniele Varrazzo 2012-02-24 03:04:53 +00:00
parent 5fcbe7bd0f
commit 4eea8bc912

View File

@ -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);