The connection to ZK is closed when nimbus shutdown. Considering the "nimbus-leadership" function is only called in "service-handler" in nimbus.clj to acquire leadership when nimbus launching, the relative codes are placed at the end of "service-handler" as "(.close nimbus-leadership)"