local_bus 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/local_bus/station.rb +3 -1
- data/lib/local_bus/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: 3abe4359b671f5e051a9e3b4e2cb0ac73ca9c00ef63c1622c158ebf4c116a1b5
|
4
|
+
data.tar.gz: 408ea743c2b5b8d3a000a8db5b8207f6e3d90edfb3976b8bf1aad3ec11dde8ab
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: de71a197041a072f69ad37e971663983da3f77a00889c71afc622d382e74480bf5bef25ebfdc5d97762d4a15f385b0d63bdd929f67c6e455dc378340d3afda93
|
7
|
+
data.tar.gz: fe165204058f9e5f9df6aa00d4f3d07db69478eeca3232a7204be758e0b6418800e903c576c927b04b0a958946e729c385a27341bb1f9168bcb2cb83198396db
|
data/lib/local_bus/station.rb
CHANGED
@@ -99,6 +99,8 @@ class LocalBus
|
|
99
99
|
|
100
100
|
@pool = nil
|
101
101
|
end
|
102
|
+
rescue
|
103
|
+
nil # ignore errors during shutdown
|
102
104
|
end
|
103
105
|
|
104
106
|
# Clean up shutdown handler
|
@@ -213,9 +215,9 @@ class LocalBus
|
|
213
215
|
# @rbs on: Array[String] -- signals to trap
|
214
216
|
# @rbs return: void
|
215
217
|
def enable_safe_shutdown(on:)
|
218
|
+
at_exit { stop }
|
216
219
|
on.each do |signal|
|
217
220
|
trap signal do
|
218
|
-
# Only queue the signal if we haven't started shutdown
|
219
221
|
@shutdown_queue.push signal unless @shutdown.true?
|
220
222
|
rescue
|
221
223
|
nil
|
data/lib/local_bus/version.rb
CHANGED