Add support for reconnecting on disconnect.