From 8db717062d5e1f41100992cc517db4a134c0f6bc Mon Sep 17 00:00:00 2001 From: Stephen Paul Weber Date: Mon, 24 May 2021 14:59:33 -0500 Subject: [PATCH] Wait until fully disconnected before EM.stop --- lib/blather_notify.rb | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/blather_notify.rb b/lib/blather_notify.rb index 5d801e9..da5c46b 100644 --- a/lib/blather_notify.rb +++ b/lib/blather_notify.rb @@ -27,10 +27,8 @@ module BlatherNotify end def self.wait_then_exit - EM.next_tick do - shutdown - EM.stop - end + shutdown + disconnected { EM.stop } @thread.join end end -- 2.38.5