Added use of greenlets and handle reconnects if cluster is enabled