Skip to content

Commit

Permalink
Fix iterator (ydb-platform#1612)
Browse files Browse the repository at this point in the history
  • Loading branch information
niksaveliev authored Feb 6, 2024
1 parent 9bf348b commit fbc9d17
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion ydb/core/kafka_proxy/kafka_connection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,14 @@ class TKafkaConnection: public TActorBootstrapped<TKafkaConnection>, public TNet
KAFKA_LOG_D("process message: ApiKey=" << Request->Header.RequestApiKey << ", ExpectedSize=" << Request->ExpectedSize
<< ", Size=" << Request->Size);

Request->Method = EApiKeyNames.find(static_cast<EApiKey>(Request->Header.RequestApiKey))->second;
auto apiKeyNameIt = EApiKeyNames.find(static_cast<EApiKey>(Request->Header.RequestApiKey));
if (apiKeyNameIt == EApiKeyNames.end()) {
KAFKA_LOG_ERROR("Unsupported message: ApiKey=" << Request->Header.RequestApiKey);
PassAway();
return false;
}

Request->Method = apiKeyNameIt->second;

PendingRequestsQueue.push_back(Request);
PendingRequests[Request->Header.CorrelationId] = Request;
Expand Down

0 comments on commit fbc9d17

Please sign in to comment.