Merge pull request #59533 from ClickHouse/chesema-grpc-server

GRPCServer: do not call value() on empty optional query_info
This commit is contained in:
Sema Checherinda 2024-02-05 18:56:46 +01:00 committed by GitHub
commit d7371a3b2d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -419,7 +419,11 @@ namespace
void read(GRPCQueryInfo & query_info_, const CompletionCallback & callback) override
{
if (!query_info.has_value())
{
callback(false);
return;
}
query_info_ = std::move(query_info).value();
query_info.reset();
callback(true);
@ -486,7 +490,11 @@ namespace
void read(GRPCQueryInfo & query_info_, const CompletionCallback & callback) override
{
if (!query_info.has_value())
{
callback(false);
return;
}
query_info_ = std::move(query_info).value();
query_info.reset();
callback(true);