File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed
cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -56,4 +56,9 @@ public interface ConnectionContext {
5656 */
5757 Mono <Void > trust (String host , int port );
5858
59+ /**
60+ * The number of retries after an unsuccessful request
61+ */
62+ Long getInvalidTokenRetries ();
63+
5964}
Original file line number Diff line number Diff line change @@ -206,7 +206,8 @@ private Flux<HttpClientResponseWithBody> invalidateToken(Flux<HttpClientResponse
206206 private Flux <HttpClientResponseWithBody > processResponse (Flux <HttpClientResponseWithBody > inbound ) {
207207 return inbound
208208 .transform (this ::invalidateToken )
209- .retry (t -> t instanceof InvalidTokenException )
209+ .retry (this .context .getConnectionContext ().getInvalidTokenRetries (),
210+ t -> t instanceof InvalidTokenException )
210211 .transform (this .context .getErrorPayloadMapper ()
211212 .orElse (ErrorPayloadMappers .fallback ()));
212213 }
You can’t perform that action at this time.
0 commit comments