add stopped_ flag to avoid multi invocation to Connection::stop()