From 7c8a4fc03f4d0aa337e9f8c94fd457af2e65dd4d Mon Sep 17 00:00:00 2001 From: XieHan Date: Wed, 16 Dec 2020 20:45:21 +0800 Subject: [PATCH] make it safe --- src/factory/WFTaskFactory.inl | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/factory/WFTaskFactory.inl b/src/factory/WFTaskFactory.inl index ba014657..07dc931f 100644 --- a/src/factory/WFTaskFactory.inl +++ b/src/factory/WFTaskFactory.inl @@ -692,7 +692,12 @@ SubTask *WFComplexClientTask::done() } else if (this->state == WFT_STATE_SYS_ERROR) { - RouteManager::notify_unavailable(route_result_.cookie, this->target); + if (this->target) + { + RouteManager::notify_unavailable(route_result_.cookie, + this->target); + } + UpstreamManager::notify_unavailable(upstream_result_.cookie); // 5. complex task failed: retry if (retry_times_ < retry_max_)