thorneliu commented on code in PR #2137:
URL: https://github.com/apache/brpc/pull/2137#discussion_r1126468512


##########
src/brpc/server.cpp:
##########
@@ -2191,6 +2197,21 @@ int Server::MaxConcurrencyOf(google::protobuf::Service* 
service,
     return MaxConcurrencyOf(service->GetDescriptor()->full_name(), 
method_name);
 }
 
+bool Server::AcceptRequest(Controller* cntl) const {
+    const Interceptor* interceptor = _options.interceptor;
+    int error_code = 0;
+    std::string error_text;
+    if (cntl && interceptor &&
+        !interceptor->Accept(cntl, error_code, error_text)) {
+        cntl->SetFailed(error_code,

Review Comment:
   And the Erron, should it always be predefined Enum EREJECT?



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to