Skip to content

Commit

Permalink
GH-646: Avoid sync when no transaction
Browse files Browse the repository at this point in the history
  • Loading branch information
garyrussell committed Apr 13, 2018
1 parent 1b53c4b commit 82eb21f
Showing 1 changed file with 7 additions and 3 deletions.
Expand Up @@ -302,9 +302,13 @@ public void abortTransaction() throws ProducerFencedException {
}

@Override
public synchronized void close() {
if (this.cache != null && !this.cache.contains(this)) {
this.cache.offer(this);
public void close() {
if (this.cache != null) {
synchronized (this) {
if (!this.cache.contains(this)) {
this.cache.offer(this);
}
}
}
}

Expand Down

0 comments on commit 82eb21f

Please sign in to comment.