Skip to content

Commit 79c46c3

Browse files
committed
GH-777: Reset running on stop()
Fixes #777 So that `isRunning()` properly reflects the state. In future, consider removing `Lifecycle` and close the producer(s) with a `ContextStoppedEvent`.
1 parent 0ffcfe0 commit 79c46c3

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Diff for: spring-kafka/src/main/java/org/springframework/kafka/core/DefaultKafkaProducerFactory.java

+1
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,7 @@ public void start() {
201201
public void stop() {
202202
try {
203203
destroy();
204+
this.running = false;
204205
}
205206
catch (Exception e) {
206207
logger.error("Exception while closing producer", e);

0 commit comments

Comments
 (0)