diff --git a/plugin-server/src/utils/db/kafka-producer-wrapper.ts b/plugin-server/src/utils/db/kafka-producer-wrapper.ts index 99fcf522d4a14..8f7cef4c06b30 100644 --- a/plugin-server/src/utils/db/kafka-producer-wrapper.ts +++ b/plugin-server/src/utils/db/kafka-producer-wrapper.ts @@ -104,10 +104,8 @@ export class KafkaProducerWrapper { } public async disconnect(): Promise { - if (this.producer.isConnected()) { - await this.flush() - await disconnectProducer(this.producer) - } + await this.flush() + await disconnectProducer(this.producer) } }