Adds automatic reconnection.