Fix URI parsed failed bug. (#1561)

This commit is contained in:
xiehan
2024-05-22 18:03:16 +08:00
committed by GitHub
parent c2eb095c09
commit fa85db076a
2 changed files with 4 additions and 0 deletions

View File

@@ -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);

View File

@@ -508,6 +508,8 @@ WFNetworkTaskFactory<REQ, RESP>::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);