Client tries to reconnect if the connection is lost