lib/zk/client/threaded.rb in zk-1.9.1 vs lib/zk/client/threaded.rb in zk-1.9.2
- old
+ new
@@ -204,9 +204,12 @@
@mutex.synchronize { unlocked_connect(opts) }
end
# (see Base#reopen)
def reopen(timeout=nil)
+ # Clear outstanding watch restrictions
+ @event_handler.clear_outstanding_watch_restrictions!
+
# If we've forked, then we can call all sorts of normally dangerous
# stuff because we're the only thread.
if forked?
# ok, just to sanity check here
raise "[BUG] we hit the fork-reopening code in JRuby!!" if defined?(::JRUBY_VERSION)