diff options
author | Daniele Varrazzo <daniele.varrazzo@gmail.com> | 2012-02-24 03:04:53 +0000 |
---|---|---|
committer | Daniele Varrazzo <daniele.varrazzo@gmail.com> | 2012-02-24 03:28:20 +0000 |
commit | 4eea8bc912096654bc65a5908b0d861f1e9bba32 (patch) | |
tree | 694feec21afe1ab2d8d22e74a2340ca68c4ee5fa | |
parent | 5fcbe7bd0ff40a2ac55820deeac7e57fac12a8cd (diff) | |
download | psycopg2-4eea8bc912096654bc65a5908b0d861f1e9bba32.tar.gz |
Dropped redundant check on the status before rollback
The check is better done inside the critical section.
-rw-r--r-- | psycopg/pqpath.c | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/psycopg/pqpath.c b/psycopg/pqpath.c index 1b6b0fa..adbaa74 100644 --- a/psycopg/pqpath.c +++ b/psycopg/pqpath.c @@ -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); |