ywkaras commented on code in PR #11184:
URL: https://github.com/apache/trafficserver/pull/11184#discussion_r1561560694


##########
src/tsutil/Regex.cc:
##########
@@ -265,11 +305,19 @@ Regex::exec(std::string_view subject) const
 int32_t
 Regex::exec(std::string_view subject, RegexMatches &matches) const
 {
+  // check if there is a compiled regex
   if (_code == nullptr) {
     return 0;
   }
+
+  // get the RegexContext instance - should only be null when shutting down
+  RegexContext *regex_context = RegexContext::get_instance();
+  if (regex_context == nullptr) {
+    return false;

Review Comment:
   Seems like this should return 0.



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