diff --git a/src/factory/KafkaTaskImpl.cc b/src/factory/KafkaTaskImpl.cc index 3465250a..b7b38b47 100644 --- a/src/factory/KafkaTaskImpl.cc +++ b/src/factory/KafkaTaskImpl.cc @@ -757,6 +757,8 @@ __WFKafkaTask *__WFKafkaTaskFactory::create_kafka_task(const char *host, uri.state = URI_STATE_ERROR; uri.error = errno; } + else + uri.state = URI_STATE_SUCCESS; task->init(std::move(uri)); task->set_keep_alive(KAFKA_KEEPALIVE_DEFAULT); diff --git a/src/factory/WFTaskFactory.inl b/src/factory/WFTaskFactory.inl index 8cf312eb..4fc89f8f 100644 --- a/src/factory/WFTaskFactory.inl +++ b/src/factory/WFTaskFactory.inl @@ -495,6 +495,8 @@ WFNetworkTaskFactory::create_client_task(enum TransportType type, uri.state = URI_STATE_ERROR; uri.error = errno; } + else + uri.state = URI_STATE_SUCCESS; task->init(std::move(uri)); task->set_transport_type(type);