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 +4 -4
- data/CHANGELOG.md +5 -0
- data/lib/legion/transport/connection.rb +13 -4
- data/lib/legion/transport/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: cbe1433690814c5e1e793b89f2a55a27f4a26eb112e74728415b4b2df997f7ac
|
|
4
|
+
data.tar.gz: fd9d8c02c174f586e052098ed681b5e8984057fbc5f13e7159a5645f17b85b52
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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
|
-
|
|
324
|
-
|
|
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,
|