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

Fix Conn.Close() infinity waiting problem #224

Closed biefy closed 4 years ago

biefy commented 4 years ago

Issue https://github.com/samuel/go-zookeeper/issues/211 has been biting us for a while. It is a bug in conn.go where queueRequest() stucks at sending request to a full yet no receiver channel. I added a separate function for allowing timeout when enqueuing a request.

coveralls commented 4 years ago

Coverage Status

Coverage decreased (-0.02%) to 79.588% when pulling 80f06884759dfdd27873bcb06c020f6b023c9a43 on biefy:master into 2cc03de413da42869e2db7ce7965d3e978d917eb on samuel:master.

coveralls commented 4 years ago

Coverage Status

Coverage decreased (-1.4%) to 78.179% when pulling 0bcc88e4b2bbd2a131de720d2b8991c3f6767f43 on biefy:master into 2cc03de413da42869e2db7ce7965d3e978d917eb on samuel:master.

biefy commented 4 years ago

@samuel Builds seems broken recently?

biefy commented 4 years ago

We solved this problem in another way. Close the PR.