Skip to content
New issue

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

zookeeper client go to dead loop if connection port is not listen #86

Open
dongweifly opened this issue Sep 20, 2022 · 0 comments
Open

Comments

@dongweifly
Copy link

i write a demo as follow. if the port is not listened , Client try write socket in dead loop.
`use zookeeper::{ZooKeeper, Watcher, WatchedEvent};
use std::time::Duration;
use std::thread;

struct LoggingWatcher;
impl Watcher for LoggingWatcher {
fn handle(&self, e: WatchedEvent) {
println!("{:?}", e)
}
}

fn main() {
env_logger::init();
let url = "127.0.0.1:2081";
let zk = ZooKeeper::connect(url, Duration::from_secs(1), LoggingWatcher).unwrap();

loop {
    thread::sleep(Duration::from_secs(5));
}

}`

Screen print fail log in dead loop
[2022-09-20T08:57:59Z ERROR zookeeper::io] Failed to write socket: Os { code: 32, kind: BrokenPipe, message: "Broken pipe" }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant