bneradt commented on code in PR #13695:
URL: https://github.com/apache/trafficserver/pull/13695#discussion_r4157220703


##########
src/proxy/http2/HTTP2.cc:
##########
@@ -45,6 +45,28 @@ struct Http2HeaderName {
 
 static VersionConverter hvc;
 
+void
+establish_flow_control_policy(const char *name, 
std::atomic<Http2FlowControlPolicy> &policy)
+{
+  auto update = [](const char *name, RecDataT type, RecData data, void 
*cookie) -> int {
+    ink_assert(type == RECD_INT);
+    RecInt value = data.rec_int;
+
+    if (value < 0 || value > 2) {
+      Error("Invalid value for %s: %" PRId64, name, value);
+      value = 0;
+    }
+    static_cast<std::atomic<Http2FlowControlPolicy> 
*>(cookie)->store(static_cast<Http2FlowControlPolicy>(value),
+                                                                      
std::memory_order_relaxed);
+    return REC_ERR_OKAY;
+  };

Review Comment:
   ink_assert is only for debug builds.



-- 
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.

To unsubscribe, e-mail: [email protected]

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

Reply via email to