From 1ad20a59d3071a0d3e023dc1a64c5708adf3c112 Mon Sep 17 00:00:00 2001 From: AndrYurk Date: Tue, 19 Nov 2024 23:07:46 +0100 Subject: [PATCH] fix:Termination of pull transfer process from consumer side not success in real but stated as "TERMINATED" --- .../transferprocess/TransferProcessProtocolServiceImpl.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/core/control-plane/control-plane-aggregate-services/src/main/java/org/eclipse/edc/connector/controlplane/services/transferprocess/TransferProcessProtocolServiceImpl.java b/core/control-plane/control-plane-aggregate-services/src/main/java/org/eclipse/edc/connector/controlplane/services/transferprocess/TransferProcessProtocolServiceImpl.java index 84d20b421b0..3acdaa34e18 100644 --- a/core/control-plane/control-plane-aggregate-services/src/main/java/org/eclipse/edc/connector/controlplane/services/transferprocess/TransferProcessProtocolServiceImpl.java +++ b/core/control-plane/control-plane-aggregate-services/src/main/java/org/eclipse/edc/connector/controlplane/services/transferprocess/TransferProcessProtocolServiceImpl.java @@ -232,6 +232,12 @@ private ServiceResult suspendedAction(TransferSuspensionMessage @NotNull private ServiceResult terminatedAction(TransferTerminationMessage message, TransferProcess transferProcess) { + if (transferProcess.getType() == PROVIDER) { + var termination = dataFlowManager.terminate(transferProcess); + if (termination.failed()) { + return ServiceResult.conflict("Cannot terminate transfer process %s: %s".formatted(transferProcess.getId(), termination.getFailureDetail())); + } + } if (transferProcess.canBeTerminated()) { observable.invokeForEach(l -> l.preTerminated(transferProcess)); transferProcess.transitionTerminated();