PandoraServer: Avoid completing grpcUnary responseObserver twice
Due to a suspension point at the end of the withTimeout block, a cancelation could happen after calling onCompleted on the grpc responseObserver. This cancelation would throw an exception ending in the catch block with an already completed responseObserver. Calling onError on an already completed responseObserver ends in an unhandled IllegalStateException ending the MonitoringInstrumentation. To solve that we move the suspension point before calling onCompleted. Bug: 244615429 Test: atest pts-bot Change-Id: Ia38a3f0a1baf88df081b49622809cca6f61e1e12
Loading
Please register or sign in to comment