samuel / go-zookeeper

Native ZooKeeper client for Go. This project is no longer maintained. Please use https://github.com/go-zookeeper/zk instead.
BSD 3-Clause "New" or "Revised" License
1.64k stars 672 forks source link

Set timeouts now occur after error check #225

Open jongiddy opened 4 years ago

jongiddy commented 4 years ago

The recent commit (2cc03de413da42869e2db7ce7965d3e978d917eb) for problems identified by deepsource.io adds more error checks for functions that may fail, which is great!

However, it also moves the unsetting of the read/write deadlines to after the read/write error check. This means that if an error occurs in a read or write, then the deadline for the connection will not be reset.