diff --git a/build.gradle.kts b/build.gradle.kts index f2dd90e8a9..436d024087 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -118,7 +118,7 @@ subprojects { allprojects { group = "org.stellar.anchor-sdk" - version = "1.2.20" + version = "1.2.21" tasks.jar { manifest { diff --git a/platform/src/main/java/org/stellar/anchor/platform/payment/observer/stellar/StellarPaymentObserver.java b/platform/src/main/java/org/stellar/anchor/platform/payment/observer/stellar/StellarPaymentObserver.java index 4cce9f91ea..4a3ff48927 100644 --- a/platform/src/main/java/org/stellar/anchor/platform/payment/observer/stellar/StellarPaymentObserver.java +++ b/platform/src/main/java/org/stellar/anchor/platform/payment/observer/stellar/StellarPaymentObserver.java @@ -172,7 +172,8 @@ public void onFailure( java.util.Optional error, java.util.Optional responseCode) { handleFailure(error); } - }); + }, + SILENCE_TIMEOUT * 1000); } private void updateReceivedMetrics(OperationResponse operationResponse) { @@ -429,6 +430,12 @@ void handleEvent(OperationResponse operationResponse) { void handleFailure(Optional exception) { // The SSEStreamer has internal errors. We will give up and let the container // manager to restart. + if (exception.isPresent() + && exception.get() instanceof IOException + && exception.get().getMessage().contains("Canceled")) { + infoF("Restarting stream"); + return; + } exception.ifPresent(throwable -> errorEx("stellar payment observer stream error: ", throwable)); // Mark the observer unhealthy setStatus(STREAM_ERROR);