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


##########
plugins/xdebug/xdebug_transforms.cc:
##########
@@ -296,8 +296,13 @@ body_transform(TSCont contp, TSEvent event, void * /* 
edata ATS_UNUSED */)
     }
 
     if (TSVIONTodoGet(src_vio) > 0) {
-      TSVIOReenable(data->output_vio);
-      TSContCall(TSVIOContGet(src_vio), TS_EVENT_VCONN_WRITE_READY, src_vio);
+      if (towrite > 0) {
+        // Only reenable and notify upstream if we consumed data.
+        // If no data was available, just return and wait for the
+        // upstream to call us again when more data arrives.

Review Comment:
   Can we replace this "what" comment with a "why" comment? This comment says 
what the code is doing (not calling reenable unless we have consumed data), but 
that is rather obvious. Can we reword this to explain that the reason we do 
this is to address the transform loop described in the PR comment?



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