diff --git a/lib/blather_notify.rb b/lib/blather_notify.rb index 5d801e954f74622eb4c6c477e4eae3d8cc41ab17..da5c46bdd0c9b821c174a20561fd5ae8429edf5b 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