aboutsummaryrefslogtreecommitdiff
path: root/src/core/ext/filters/client_channel/resolver/polling_resolver.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/ext/filters/client_channel/resolver/polling_resolver.cc')
-rw-r--r--src/core/ext/filters/client_channel/resolver/polling_resolver.cc16
1 files changed, 7 insertions, 9 deletions
diff --git a/src/core/ext/filters/client_channel/resolver/polling_resolver.cc b/src/core/ext/filters/client_channel/resolver/polling_resolver.cc
index bd99aebae5..e8d81e9180 100644
--- a/src/core/ext/filters/client_channel/resolver/polling_resolver.cc
+++ b/src/core/ext/filters/client_channel/resolver/polling_resolver.cc
@@ -28,7 +28,6 @@
#include "absl/status/status.h"
#include "absl/status/statusor.h"
#include "absl/strings/str_cat.h"
-#include "absl/strings/string_view.h"
#include "absl/strings/strip.h"
#include <grpc/support/log.h>
@@ -39,6 +38,7 @@
#include "src/core/lib/gprpp/ref_counted_ptr.h"
#include "src/core/lib/gprpp/work_serializer.h"
#include "src/core/lib/iomgr/exec_ctx.h"
+#include "src/core/lib/resolver/endpoint_addresses.h"
#include "src/core/lib/service_config/service_config.h"
#include "src/core/lib/uri/uri_parser.h"
@@ -105,10 +105,9 @@ void PollingResolver::ShutdownLocked() {
}
void PollingResolver::ScheduleNextResolutionTimer(const Duration& timeout) {
- RefCountedPtr<PollingResolver> self = Ref();
next_resolution_timer_handle_ =
channel_args_.GetObject<EventEngine>()->RunAfter(
- timeout, [self = std::move(self)]() mutable {
+ timeout, [self = RefAsSubclass<PollingResolver>()]() mutable {
ApplicationCallbackExecCtx callback_exec_ctx;
ExecCtx exec_ctx;
auto* self_ptr = self.get();
@@ -174,12 +173,11 @@ void PollingResolver::OnRequestCompleteLocked(Result result) {
result.resolution_note.c_str());
}
GPR_ASSERT(result.result_health_callback == nullptr);
- RefCountedPtr<PollingResolver> self =
- Ref(DEBUG_LOCATION, "result_health_callback");
- result.result_health_callback = [self =
- std::move(self)](absl::Status status) {
- self->GetResultStatus(std::move(status));
- };
+ result.result_health_callback =
+ [self = RefAsSubclass<PollingResolver>(
+ DEBUG_LOCATION, "result_health_callback")](absl::Status status) {
+ self->GetResultStatus(std::move(status));
+ };
result_status_state_ = ResultStatusState::kResultHealthCallbackPending;
result_handler_->ReportResult(std::move(result));
}