From 585fac4561907719afc39e8240954d69de3481ed Mon Sep 17 00:00:00 2001 From: Jack Christensen Date: Thu, 19 Sep 2019 22:03:29 -0500 Subject: [PATCH] Rollback should mark tx as closed --- tx.go | 1 + 1 file changed, 1 insertion(+) diff --git a/tx.go b/tx.go index 404bf7c9..0944cc14 100644 --- a/tx.go +++ b/tx.go @@ -159,6 +159,7 @@ func (tx *dbTx) Rollback(ctx context.Context) error { } _, err := tx.conn.Exec(ctx, "rollback") + tx.closed = true if err != nil { // A rollback failure leaves the connection in an undefined state tx.conn.die(errors.Errorf("rollback failed: %w", err))