Move `onErrorResume` to individual `sendMessage` `Mono`
This commit is contained in:
		
							parent
							
								
									656326355a
								
							
						
					
					
						commit
						a9a2e40fed
					
				|  | @ -360,7 +360,7 @@ public class WebSocketConnection implements MessageAvailabilityListener, Displac | ||||||
|         .limitRate(MESSAGE_PUBLISHER_LIMIT_RATE) |         .limitRate(MESSAGE_PUBLISHER_LIMIT_RATE) | ||||||
|         .flatMapSequential(envelope -> |         .flatMapSequential(envelope -> | ||||||
|             Mono.fromFuture(() -> sendMessage(envelope) |             Mono.fromFuture(() -> sendMessage(envelope) | ||||||
|                 .orTimeout(sendFuturesTimeoutMillis, TimeUnit.MILLISECONDS))) |                     .orTimeout(sendFuturesTimeoutMillis, TimeUnit.MILLISECONDS)) | ||||||
|                 .onErrorResume( |                 .onErrorResume( | ||||||
|                     // let the first error pass through to terminate the subscription |                     // let the first error pass through to terminate the subscription | ||||||
|                     e -> { |                     e -> { | ||||||
|  | @ -372,6 +372,7 @@ public class WebSocketConnection implements MessageAvailabilityListener, Displac | ||||||
|                     // otherwise just emit nothing |                     // otherwise just emit nothing | ||||||
|                     e -> Mono.empty() |                     e -> Mono.empty() | ||||||
|                 ) |                 ) | ||||||
|  |         ) | ||||||
|         .subscribeOn(messageDeliveryScheduler) |         .subscribeOn(messageDeliveryScheduler) | ||||||
|         .subscribe( |         .subscribe( | ||||||
|             // no additional consumer of values - it is Flux<Void> by now |             // no additional consumer of values - it is Flux<Void> by now | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue
	
	 Chris Eager
						Chris Eager