Github user roodkcab commented on the issue:
https://github.com/apache/zookeeper/pull/639
the early approach of adding ssl to the client uses a while loop to
accomplish the certificate process between server and client, but it didn't
check the connectivity, so when the client get a disconnect or refused by the
server, it can't break the infinity loop. then I put such process after poll
tells me the plain connection is ok (triway handshaking finished), and return a
ZSSLCONNECTIONERROR on SSL_WANT_READ or SSL_WANT_WRITE, making zookeeper's
event loop start over again, and everything works fine this time.
---