justinsb / jetcd

Java binding for etcd
Apache License 2.0
137 stars 55 forks source link

Problem to set multiple watchers #12

Open andersoncunha opened 10 years ago

andersoncunha commented 10 years ago

I need to set whatchers in more than one key, but doing so it's not possible to make any further request to jetcd, because the requests remain standing. How can I solve this?

kyleschlosser commented 10 years ago

I ran into this issue as well, it seems that creating a second watch causes a deadlock.

andersoncunha commented 10 years ago

I solved this issue creating a pull of CloseableHttpAsyncClient (client connection), the bind maintain only one httpclient, so wen we make a get with wait=true (like done in jetcd watcher), the client came blocked awaiting!

I've made some corrections and customizations over the bind code and intend to contribute with the project after some amount of tests.

Thanks,

Att, Anderson Cunha

2014-08-25 14:21 GMT-03:00 kyleschlosser notifications@github.com:

I ran into this issue as well, it seems that creating a second watch causes a deadlock.

— Reply to this email directly or view it on GitHub https://github.com/justinsb/jetcd/issues/12#issuecomment-53294844.