check connection state for zookeeper