Fix server-side EndOfStreamException and CancelledKeyExceptions warnings#54
Fix server-side EndOfStreamException and CancelledKeyExceptions warnings#54csfrancis wants to merge 1 commit intozk-ruby:masterfrom
Conversation
|
Is this something you've had a chance to submit to https://issues.apache.org/jira/browse/ZOOKEEPER? I'm concerned about the Doing it this way could cause the Ruby VM to hang for up to 3 seconds while that |
|
I haven't yet submitted it to the Zookeeper JIRA. I can understand your concern about the /* make sure the close request is sent; we set timeout to an arbitrary
* (but reasonable) number of milliseconds since we want the call to block*/
rc=adaptor_send_queue(zh, 3000);The call to |
This fixes the server warnings generated in zookeeper.log:
These warnings are caused by the Zookeeper C API client disconnecting before a response can be sent back from the server. The patch adds a function,
wait_for_closethat is called fromzookeeper_close, which will block until a response is received for the close request, thereby allowing the connection to be gracefully closed.