legionio 1.5.12 → 1.5.13
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 +7 -0
- data/lib/legion/service.rb +11 -2
- data/lib/legion/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: 4815cb38dfcd2dc20af4e57d1ec14f63a9bf7876477b70fc11696b775685addf
|
|
4
|
+
data.tar.gz: 79f424e95bbe364be35ef6a1b5b11da3ef476dda096443a303b0d8136ffc79e5
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 4edcd4fabaa737d35e6176668dc63cd6091533240f0ca038250b2b44652130590ad04ee144ed58df2eca1aa3d5313353b46a99069b42eefd2d224384694209a5
|
|
7
|
+
data.tar.gz: 16d72dd0db3df555b27defbe22fe1a3b27e2aa11d11674f57d89bc8de593f624aeb5c5ae6fcb589a5f085b0eea9619b0fd6ef56349cf749a3819210f5cc7b7ca
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# Legion Changelog
|
|
2
2
|
|
|
3
|
+
## [1.5.13] - 2026-03-25
|
|
4
|
+
|
|
5
|
+
### Fixed
|
|
6
|
+
- API startup no longer spams Puma banner on port conflict — pre-checks port with lightweight TCP probe before attempting Puma boot
|
|
7
|
+
- Reduced API bind retries from 10 to 3 (6s total vs 30s) so boot completes quickly when port is occupied
|
|
8
|
+
- Daemon remains fully functional (shutdown, Ctrl+C) even when API fails to bind
|
|
9
|
+
|
|
3
10
|
## [1.5.12] - 2026-03-25
|
|
4
11
|
|
|
5
12
|
### Added
|
data/lib/legion/service.rb
CHANGED
|
@@ -265,10 +265,12 @@ module Legion
|
|
|
265
265
|
|
|
266
266
|
@api_thread = Thread.new do
|
|
267
267
|
retries = 0
|
|
268
|
-
max_retries = api_settings.fetch(:bind_retries,
|
|
269
|
-
retry_wait = api_settings.fetch(:bind_retry_wait,
|
|
268
|
+
max_retries = api_settings.fetch(:bind_retries, 3)
|
|
269
|
+
retry_wait = api_settings.fetch(:bind_retry_wait, 2)
|
|
270
270
|
|
|
271
271
|
begin
|
|
272
|
+
raise Errno::EADDRINUSE, "port #{port} already bound" if port_in_use?(bind, port)
|
|
273
|
+
|
|
272
274
|
Legion::API.run!(traps: false)
|
|
273
275
|
rescue Errno::EADDRINUSE
|
|
274
276
|
retries += 1
|
|
@@ -630,6 +632,13 @@ module Legion
|
|
|
630
632
|
|
|
631
633
|
private
|
|
632
634
|
|
|
635
|
+
def port_in_use?(bind, port)
|
|
636
|
+
TCPServer.new(bind, port).close
|
|
637
|
+
false
|
|
638
|
+
rescue Errno::EADDRINUSE
|
|
639
|
+
true
|
|
640
|
+
end
|
|
641
|
+
|
|
633
642
|
def build_api_tls_config(api_settings)
|
|
634
643
|
tls = api_settings[:tls] || {}
|
|
635
644
|
tls = tls.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
data/lib/legion/version.rb
CHANGED