We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi, i'm trying to reopen a connection from a pool in case of a ZK::Exceptions::ConnectionLoss error like described in #92.
I assume that i have to call reopen on connection.zk when using the pool.with_lock { |connection| } method.
However, this does not work with JRuby. Is this an issue with the gem or am i doing something wrong here?
require "bundler/inline" gemfile true do source "https://rubygems.org" do gem "zk", "1.9.6" end end require "zk" pool = ZK::Pool::Bounded.new( "127.0.0.1:2181", chroot: "/test", timeout: 1, min_clients: 1, max_clients: 2 ) opts = { wait: 1 } pool.with_lock("1234", opts) do |connection| puts connection.zk.connected? connection.zk.close! puts connection.zk.connected? puts connection.zk.reopen.inspect puts connection.zk.connected? end
JRuby 9.1.12.0:
true false :connecting false
Waiting longer for the client to be connected yields the same result.
MRI 2.3.3:
true false :connected true
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hi,
i'm trying to reopen a connection from a pool in case of a ZK::Exceptions::ConnectionLoss error like described in #92.
I assume that i have to call reopen on connection.zk when using the pool.with_lock { |connection| } method.
However, this does not work with JRuby. Is this an issue with the gem or am i doing something wrong here?
JRuby 9.1.12.0:
Waiting longer for the client to be connected yields the same result.
MRI 2.3.3:
The text was updated successfully, but these errors were encountered: