lib/slack/real_time/concurrency/eventmachine.rb in slack-ruby-client-0.12.0 vs lib/slack/real_time/concurrency/eventmachine.rb in slack-ruby-client-0.13.0

- old
+ new

@@ -25,14 +25,20 @@ end end class Socket < Slack::RealTime::Socket def start_async(client) - thread = ensure_reactor_running + @thread = ensure_reactor_running client.run_loop - thread + @thread + end + + def close + super + EventMachine.stop if @thread + @thread = nil end def send_data(message) logger.debug("#{self.class}##{__method__}") { message } driver.send(message)