Sha256: b64b41dfa975d618637918ba767ef4135096f08236ecee024c94ae7ff938f854

Contents?: true

Size: 457 Bytes

Versions: 2

Compression:

Stored size: 457 Bytes

Contents

module Faye
  module Patches

    def stop!
      @state = Faye::Client::DISCONNECTED

      info('Disconnecting ?', @dispatcher.client_id)
      @dispatcher.close
      info('Clearing channel listeners for ?', @dispatcher.client_id)
      @channels = Channel::Set.new
      @response_callbacks = {}
      true
    end

    def reconnect(&block)
      @reconnect_callback = block
      connect
    end

  end
end

Faye::Client.send(:include, Faye::Patches)

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
faye-reconnect-1.0.0 lib/faye/patches/client.rb
faye-reconnect-0.0.3 lib/faye/patches/client.rb