JosiahWI commented on code in PR #13927:
URL: https://github.com/apache/trafficserver/pull/13927#discussion_r4443542344


##########
src/iocore/cache/CacheVC.cc:
##########
@@ -853,8 +853,12 @@ CacheVC::scanObject(int /* event ATS_UNUSED */, Event * /* 
e ATS_UNUSED */)
         }
       }
       earliest_key = key;
-      int result1  = 
_action.continuation->handleEvent(CACHE_EVENT_SCAN_OBJECT, vector.get(i));
-      switch (result1) {
+      auto result1 = _action.call_back(CACHE_EVENT_SCAN_OBJECT, vector.get(i));
+      // The handler may have cancelled the scan.
+      if (_action.cancelled) {
+        goto Lcancel;
+      }

Review Comment:
   Not an issue (cancellation check is equivalent), but will make clearer.



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