hillsp commented on a change in pull request #1945: Grpc RpcHandler: Fix finish 
before start behavior
URL: 
https://github.com/apache/incubator-pagespeed-mod/pull/1945#discussion_r319295921
 
 

 ##########
 File path: pagespeed/controller/rpc_handler.h
 ##########
 @@ -228,7 +228,7 @@ void RpcHandler<AsyncService, RequestT, 
ResponseT>::ReadDone(RefPtrT ref) {
 template <typename AsyncService, typename RequestT, typename ResponseT>
 bool RpcHandler<AsyncService, RequestT, ResponseT>::Finish(
     const ::grpc::Status& status) {
-  if (state_ == FINISHED) {
+  if (state_ == FINISHED || state_ == INIT) {
 
 Review comment:
   I guess that a change in gRPC is making Finish() hang now if the client 
isn't properly initialized. Probably the call to Finish() is now happening 
before something that it used to happen after. However, the early exit for INIT 
here means you're not setting state_ to FINISHED. That's causing the extra call 
to HandleRequest(), which you definitely don't want. Returning false for this 
case is fine, but you still need to set state_

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to