legion-transport 1.4.27 → 1.4.28

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 34f1262388f94d320591c4626c44d07d7da821d89d0ccf7667daa6447c21902d
4
- data.tar.gz: 47bb88de9f7f28684dee8b96fe62d91eca3c766bd232bcf895a1cf7426482037
3
+ metadata.gz: cbe1433690814c5e1e793b89f2a55a27f4a26eb112e74728415b4b2df997f7ac
4
+ data.tar.gz: fd9d8c02c174f586e052098ed681b5e8984057fbc5f13e7159a5645f17b85b52
5
5
  SHA512:
6
- metadata.gz: 9bbc69ae6b29a4ce61f47d81b326b7ff5f915939bbc88702c8e7df2f52fd9bb9cf9e1f155659d1b294ece6e0ab9cac56694d8ca8f5920f7938c6eec35942e7c2
7
- data.tar.gz: 1e989cbb8273f1877f35b264512269e6d8ba5db1180153c2b2f8cff169c15005c76ee1390bd5d6c4cff97267dad65840b6cd2d28f2abbe9a815d85e2d7b4b5e3
6
+ metadata.gz: 7ac93c953cb5c97e34195aaf56e38a397a41c9d8d673cb2521eb1fc2fe1e1e1505ebba9bca429348202d8e52392b4e94670c4f588bce2871307ca1eb3a265e81
7
+ data.tar.gz: 5595b08fc064cab224e250292e9ef594b780b9b2f16f8ec45e4c6aee12b075ec43c51aae23fe96c9cf0885393d491ababba1dd66bb82d9411a82850f2be8d0ae
data/CHANGELOG.md CHANGED
@@ -2,6 +2,11 @@
2
2
 
3
3
  ## [Unreleased]
4
4
 
5
+ ## [1.4.28] - 2026-05-17
6
+
7
+ ### Fixed
8
+ - Fixed sweep closing channels that still have active Bunny consumers: subscription actors are instantiated on pool threads that subsequently die, but the channel is handed off to Bunny's `ConsumerWorkPool`. The sweep now checks `channel.consumers` and skips channels with registered consumers.
9
+
5
10
  ## [1.4.27] - 2026-05-17
6
11
 
7
12
  ### Fixed
@@ -319,11 +319,11 @@ module Legion
319
319
 
320
320
  channel = @channel_registry.delete(thread)
321
321
  next unless channel
322
+ next unless channel.open?
323
+ next if channel_has_consumers?(channel)
322
324
 
323
- if channel.open?
324
- channel.close
325
- swept += 1
326
- end
325
+ channel.close
326
+ swept += 1
327
327
  rescue StandardError => e
328
328
  @channel_registry.delete(thread)
329
329
  handle_exception(e, level: :warn, handled: true, operation: 'transport.connection.sweep_channel')
@@ -332,6 +332,15 @@ module Legion
332
332
  log.info "Swept #{swept} orphaned channel(s) from dead threads (remaining=#{@channel_registry.size})" if swept.positive?
333
333
  end
334
334
 
335
+ def channel_has_consumers?(channel)
336
+ return false unless channel.respond_to?(:consumers)
337
+
338
+ !channel.consumers.empty?
339
+ rescue StandardError => e
340
+ handle_exception(e, level: :debug, handled: true, operation: 'transport.connection.channel_has_consumers?')
341
+ false
342
+ end
343
+
335
344
  def pre_mark_sessions_closing
336
345
  candidates = [
337
346
  session,
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Legion
4
4
  module Transport
5
- VERSION = '1.4.27'
5
+ VERSION = '1.4.28'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: legion-transport
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.27
4
+ version: 1.4.28
5
5
  platform: ruby
6
6
  authors:
7
7
  - Esity