From b104530874de26ec07d2240be0a7f5d68b9225a1 Mon Sep 17 00:00:00 2001 From: Stephen Paul Weber Date: Wed, 14 Jul 2021 09:07:27 -0500 Subject: [PATCH] Do not hang forever if shutdown fails --- lib/blather_notify.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/blather_notify.rb b/lib/blather_notify.rb index da5c46bdd0c9b821c174a20561fd5ae8429edf5b..754e3db7a8bf4e8956706701c408d784e882959a 100644 --- a/lib/blather_notify.rb +++ b/lib/blather_notify.rb @@ -27,8 +27,9 @@ module BlatherNotify end def self.wait_then_exit - shutdown disconnected { EM.stop } + EM.add_timer(30) { EM.stop } + shutdown @thread.join end end