File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed
Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -138,7 +138,7 @@ def shutdown(workers, pool)
138138 logger . warn 'Pool is shut down, waiting for termination!'
139139 pool . wait_for_termination
140140 logger . warn 'Bye bye!'
141- wake_main_thread
141+ wake_main_thread_and_exit!
142142 end
143143 end
144144
@@ -162,13 +162,16 @@ def trap_signals(workers, pool)
162162
163163 # Wakes up the main thread to allow it to continue execution after the server is stopped.
164164 # This is useful when the server is running in a blocking mode.
165- # If the main thread is not blocked, this method does nothing .
165+ # If the main thread is not blocked, this method does just exits .
166166 #
167167 # @return [void]
168- def wake_main_thread
168+ def wake_main_thread_and_exit!
169169 Thread . main . wakeup
170+ exit 0
170171 rescue ThreadError
171- nil
172+ exit 0
173+ rescue StandardError
174+ exit 1
172175 end
173176 end
174177
You can’t perform that action at this time.
0 commit comments