Skip to content

Commit

Permalink
improve
Browse files Browse the repository at this point in the history
Change-Id: I0f473063f6df1e43170f01a655a87a1c790f028a
  • Loading branch information
zhoney committed Jan 13, 2021
1 parent 921efba commit 4047231
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import java.util.Date;
import java.util.concurrent.Callable;

import org.apache.tinkerpop.gremlin.structure.Transaction;
import org.slf4j.Logger;

import com.baidu.hugegraph.HugeException;
Expand Down Expand Up @@ -56,8 +57,9 @@ protected void cancelled() {
}

protected void closeTx() {
if (this.graph().tx().isOpen()) {
this.graph().tx().close();
Transaction tx = this.graph().tx();
if (tx.isOpen()) {
tx.close();
}
}

Expand Down

0 comments on commit 4047231

Please sign in to comment.