Skip to content

Commit 2c8cd78

Browse files
Update shutdown method
1 parent 45eaf82 commit 2c8cd78

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/streamy/message_buses/kafka_message_bus.rb

+3-3
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ def deliver(key:, topic:, payload:, priority:)
2424
end
2525

2626
def shutdown
27-
async_producer.shutdown if async_producer?
28-
sync_producers.map(&:shutdown)
27+
async_producer.close if async_producer?
28+
sync_producers.map(&:close)
2929
end
3030

3131
private
@@ -48,7 +48,7 @@ def async_producer
4848
end
4949

5050
def async_producer?
51-
@_async_producer.present?
51+
!!@_async_producer
5252
end
5353

5454
def sync_producer

0 commit comments

Comments
 (0)