We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1529a42 commit 23e97a5Copy full SHA for 23e97a5
spring-kafka/src/main/java/org/springframework/kafka/core/DefaultKafkaProducerFactory.java
@@ -289,9 +289,13 @@ public void abortTransaction() throws ProducerFencedException {
289
}
290
291
@Override
292
- public synchronized void close() {
293
- if (this.cache != null && !this.cache.contains(this)) {
294
- this.cache.offer(this);
+ public void close() {
+ if (this.cache != null) {
+ synchronized (this) {
295
+ if (!this.cache.contains(this)) {
296
+ this.cache.offer(this);
297
+ }
298
299
300
301
0 commit comments