Skip to content

Commit

Permalink
sdd a closing? event for the client
Browse files Browse the repository at this point in the history
  • Loading branch information
slyphon committed Apr 23, 2012
1 parent 1324253 commit 7186091
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/z_k/z_k_event_machine/client.rb
Expand Up @@ -18,7 +18,6 @@ class Client < ZK::Client::Base
# @method on_connection_lost
# @return [Deferred::Default]
deferred_event :connection_lost


# Registers a one-shot callback for the ZOO_CONNECTED_STATE event.
#
Expand Down Expand Up @@ -60,6 +59,11 @@ def initialize(host, opts={})
register_default_event_handlers!
end

# @private
def closing?
!!@closing
end

# open a ZK connection, attach it to the reactor.
# returns an EM::Deferrable that will be called when the connection is
# ready for use
Expand Down

0 comments on commit 7186091

Please sign in to comment.