Fix bug in apache zookeeper library

Timeouts are not properly handled when there is an outstanding request.