From 19d254cebc552fd445bde459f8af8c7db61661aa Mon Sep 17 00:00:00 2001 From: Mateusz Filipowicz Date: Tue, 1 Feb 2022 00:43:41 +0100 Subject: [PATCH] fix(gitlab-client): retry on connections reset by peer --- .../src/main/kotlin/com/roche/gitlab/api/GitLabApiBuilder.kt | 1 + 1 file changed, 1 insertion(+) diff --git a/ambassador-gitlab-client/src/main/kotlin/com/roche/gitlab/api/GitLabApiBuilder.kt b/ambassador-gitlab-client/src/main/kotlin/com/roche/gitlab/api/GitLabApiBuilder.kt index 1416ba79..89551c30 100644 --- a/ambassador-gitlab-client/src/main/kotlin/com/roche/gitlab/api/GitLabApiBuilder.kt +++ b/ambassador-gitlab-client/src/main/kotlin/com/roche/gitlab/api/GitLabApiBuilder.kt @@ -51,6 +51,7 @@ class GitLabApiBuilder internal constructor() { Exceptions.ServerErrorException::class.java, CallNotPermittedException::class.java ) + .retryOnException { it.message?.lowercase()?.contains("reset by peer") ?: false } fun url(url: String): GitLabApiBuilder { this.url = url