File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/tokenprovider Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -336,11 +336,6 @@ private Mono<String> token(final ConnectionContext connectionContext) {
336336 }
337337
338338 final Mono <String > baseTokenRequest = createTokenRequest (connectionContext )
339- /*
340- * Ensure execution on single thread.
341- * This prevents sending requests to the UAA server with expired refresh tokens.
342- */
343- .publishOn (connectionContext .getTokenScheduler ())
344339 .doOnSubscribe (s -> LOGGER .debug ("Starting new UAA JWT token request" ))
345340 .doOnSuccess (token -> LOGGER .debug ("UAA JWT token request completed successfully" ))
346341 .doOnError (error -> LOGGER .debug ("UAA JWT token request failed" , error ))
@@ -353,7 +348,12 @@ private Mono<String> token(final ConnectionContext connectionContext) {
353348 final Mono <String > newTokenRequest = connectionContext
354349 .getCacheDuration ()
355350 .map (baseTokenRequest ::cache )
356- .orElseGet (baseTokenRequest ::cache );
351+ .orElseGet (baseTokenRequest ::cache )
352+ /*
353+ * Ensure execution on single thread.
354+ * This prevents sending requests to the UAA server with expired refresh tokens.
355+ */
356+ .publishOn (connectionContext .getTokenScheduler ());
357357
358358 // Store the active request atomically
359359 final Mono <String > actualRequest = this .activeTokenRequests .putIfAbsent (connectionContext , newTokenRequest );
You can’t perform that action at this time.
0 commit comments