go-zookeeper / zk

Native ZooKeeper client for Go
BSD 3-Clause "New" or "Revised" License
512 stars 130 forks source link

reconnect if failed #58

Open fdingiit opened 3 years ago

fdingiit commented 3 years ago

reconnect if failed

nemith commented 3 years ago

I am not sure this will do what you want it to do. connect() already has a retry loop inside of it and it only returns errors if c.shoudlExit is true.

What issues are you running into that you think this change is needed? What testing have you done before/after the change? Can you show some test results? Unit tests would be good as well, but like i stated above I am not sure this will do what we want to to do, however perhaps there is another issue you are trying to solve?

codecov[bot] commented 3 years ago

Codecov Report

Merging #58 (682b812) into master (ebcbcaa) will increase coverage by 0.88%. The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #58      +/-   ##
==========================================
+ Coverage   75.77%   76.65%   +0.88%     
==========================================
  Files           7        7              
  Lines        1189     1191       +2     
==========================================
+ Hits          901      913      +12     
+ Misses        197      190       -7     
+ Partials       91       88       -3     
Impacted Files Coverage Δ
conn.go 74.17% <100.00%> (+1.65%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update ebcbcaa...682b812. Read the comment docs.