Close fd before attempting connect to zookeeper

Reached fd limit on discovery server due to number of connects to zookeeper, need to close fd before reconnect.