Skip to content

Commit 80ae08b

Browse files
authored
[service-utils] fix: build error on kafka disconnect() (#6388)
1 parent 0c0d837 commit 80ae08b

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

packages/service-utils/src/node/kafka.ts

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -111,12 +111,9 @@ export class KafkaProducer {
111111
* Useful when shutting down the service to flush in-flight events.
112112
*/
113113
async disconnect() {
114-
if (this.isConnected) {
115-
try {
116-
await this.producer.flush();
117-
await this.producer.disconnect();
118-
} catch {}
119-
this.isConnected = false;
120-
}
114+
try {
115+
await this.producer.flush();
116+
await this.producer.disconnect();
117+
} catch {}
121118
}
122119
}

0 commit comments

Comments
 (0)