Skip to content

Commit

Permalink
Update shutdown method
Browse files Browse the repository at this point in the history
  • Loading branch information
robertomiranda committed Nov 21, 2023
1 parent 45eaf82 commit 2c8cd78
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/streamy/message_buses/kafka_message_bus.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ def deliver(key:, topic:, payload:, priority:)
end

def shutdown
async_producer.shutdown if async_producer?
sync_producers.map(&:shutdown)
async_producer.close if async_producer?
sync_producers.map(&:close)
end

private
Expand All @@ -48,7 +48,7 @@ def async_producer
end

def async_producer?
@_async_producer.present?
!!@_async_producer
end

def sync_producer
Expand Down

0 comments on commit 2c8cd78

Please sign in to comment.