diff --git a/src/factory/KafkaTaskImpl.cc b/src/factory/KafkaTaskImpl.cc index ccd45304ec..6b87e784af 100644 --- a/src/factory/KafkaTaskImpl.cc +++ b/src/factory/KafkaTaskImpl.cc @@ -774,6 +774,8 @@ __WFKafkaTask *__WFKafkaTaskFactory::create_kafka_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_keep_alive(KAFKA_KEEPALIVE_DEFAULT); diff --git a/src/factory/WFTaskFactory.inl b/src/factory/WFTaskFactory.inl index ed24767c12..acd786e5df 100644 --- a/src/factory/WFTaskFactory.inl +++ b/src/factory/WFTaskFactory.inl @@ -508,6 +508,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);