https://github.com/spring-projects/spring-framework/blob/313b063aef28135e858f6f459dae547939804278/spring-web/src/main/java/org/springframework/http/client/ReactorResourceFactory.java#L121-L130
I wonder whether useGlobalResources=false
option ignores connectionProviderSupplier
option or not cause the code seems it's not
https://github.com/spring-projects/spring-framework/blob/313b063aef28135e858f6f459dae547939804278/spring-web/src/main/java/org/springframework/http/client/ReactorResourceFactory.java#L262-L289
if i'm wrong enlighten me please thank you in advance
Comment From: snicoll
It's making sure that connectionProvider
is null
, then it assigns it. If it is assigned the supplier is never invoked.
Comment From: whojes-toss
yeah but i was pointing out that the comment says Note that this option is ignored if {@code userGlobalResources=false}
and it is wrong because when userGlobalResources=false && connectionProvider==null
the supplier will be invoked.
Comment From: snicoll
Thanks for following-up. Looks like I looked at the wrong branch. We'll have another look.
Comment From: simonbasle
The phrasing is indeed misleading, and similarly in #setLoopResources(Supplier<LoopResources>)