Skip to content

Commit

Permalink
Update ExecutionServer.java
Browse files Browse the repository at this point in the history
  • Loading branch information
fmeum authored Jun 30, 2024
1 parent 0c392bb commit ac4562f
Showing 1 changed file with 1 addition and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -217,11 +217,7 @@ public void execute(ExecuteRequest request, StreamObserver<Operation> responseOb
executorService.submit(() -> execute(context, request, opName));
operationsCache.put(opName, future);
((ServerCallStreamObserver<Operation>) responseObserver)
.setOnCancelHandler(
() -> {
future.cancel(false);
operationsCache.remove(opName);
});
.setOnCancelHandler(() -> operationsCache.remove(opName));
// Send the first operation.
responseObserver.onNext(Operation.newBuilder().setName(opName).build());
// When the operation completes, send the result.
Expand Down

0 comments on commit ac4562f

Please sign in to comment.