lidavidm commented on a change in pull request #7174:
URL: https://github.com/apache/arrow/pull/7174#discussion_r438312222



##########
File path: cpp/src/arrow/flight/client.cc
##########
@@ -273,7 +267,29 @@ class GrpcClientInterceptorAdapter : public 
grpc::experimental::Interceptor {
   }
 
  private:
+  void ReceivedHeaders(
+      const std::multimap<grpc::string_ref, grpc::string_ref>& metadata) {
+    if (received_headers_) {
+      return;
+    }
+    received_headers_ = true;
+    CallHeaders headers;
+    for (const auto& entry : metadata) {
+      headers.insert({util::string_view(entry.first.data(), 
entry.first.length()),
+                      util::string_view(entry.second.data(), 
entry.second.length())});
+    }
+    for (const auto& middleware : middleware_) {
+      middleware->ReceivedHeaders(headers);

Review comment:
       It will always be called once. (Calls to Intercept(), which calls this 
method, don't run concurrently for the same RPC.)




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to