def on_close(data, *args)
      options = args.extract_options!
      options[:code] ||= (data && data.code) || '1000'

      disconnect
      fail SlackBotManager::ConnectionRateLimited if %w(1008 429).include?(options[:code].to_s)
    end
def on_close(data, *args)
      options = args.extract_options!
      options[:code] ||= (data && data.code) || '1000'

      disconnect
      fail SlackBotManager::ConnectionRateLimited if %w(1008 429).include?(options[:code].to_s)
    end
Handle when connection gets closed