<commit_before>require 'faye/websocket'
require 'eventmachine'

module Slack
  module RealTime
    module Concurrency
      module Eventmachine
        class Socket < Slack::RealTime::Socket
          def self.close
            ::EM.stop
          end

          def self.run(*args)
            ::EM.run do
              yield new(*args)
            end
          end

          def send_data(message)
            driver.send(message)
          end

          protected

          def connect
            @driver = ::Faye::WebSocket::Client.new(url, nil, options)
          end<commit_msg>Don't EM.close explicitly on disconnect.<commit_after>require 'faye/websocket'
require 'eventmachine'

module Slack
  module RealTime
    module Concurrency
      module Eventmachine
        class Socket < Slack::RealTime::Socket
          def self.close
          end

          def self.run(*args)
            ::EM.run do
              yield new(*args)
            end
          end

          def send_data(message)
            driver.send(message)
          end

          protected

          def connect
            @driver = ::Faye::WebSocket::Client.new(url, nil, options)
          end
{'fraction_non_alphanumeric': 0.0760777683854607, 'fraction_numerical': 0.0, 'mean_word_length': 1.5462365591397849, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7241525', 'n_tokens_mistral': 316, 'n_tokens_neox': 303, 'n_words': 80}