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 dd90d49ce3..0bbb6c2a6d 100644 --- a/src/factory/WFTaskFactory.inl +++ b/src/factory/WFTaskFactory.inl @@ -506,6 +506,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);