Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit de755c0a authored by David Duarte's avatar David Duarte Committed by Charlie Boutier
Browse files

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
Ignore-AOSP-First: Cherry-picked from AOSP
Merged-In: Ia38a3f0a1baf88df081b49622809cca6f61e1e12
Change-Id: Ia38a3f0a1baf88df081b49622809cca6f61e1e12
parent 7aeb46d3
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment