Skip to content

Commit a150643

Browse files
committed
Simplified state check when closing transaction
New condition is the same as old one by reads a bit better.
1 parent c78518f commit a150643

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

driver/src/main/java/org/neo4j/driver/internal/ExplicitTransaction.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ CompletionStage<Void> closeAsync()
158158
{
159159
return commitAsync();
160160
}
161-
else if ( state == State.ACTIVE || state == State.MARKED_FAILED || state == State.TERMINATED )
161+
else if ( state != State.COMMITTED && state != State.ROLLED_BACK )
162162
{
163163
return rollbackAsync();
164164
}

0 commit comments

Comments
 (0)