New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Kotlin code that uses WebClient fails after upgrade to Spring 5.2 #25629
Comments
@rstoyanchev @sdeleuze Seems like one to look at for 5.2.10... |
So I think this is expected behavior, essentially avoid using As an aside, the |
Thank you for the detailed explanation and for pointing to the proper method, @rstoyanchev. We all appreciate the efforts made to provide the high-quality resource handling. Just a small suggestion regarding |
@orange-buffalo thanks for pointing that out. I am actually in communication with @sdeleuze about that but in the mean time I've re-opened #25751. |
Affects: 5.2
Consider the following usage of
WebClient
:This code is leveraging
kotlinx-coroutines-reactor
extensions to useWebClient
in imperative manner. It works fine on Spring Framework 5.1.After upgrade to 5.2, this code starts failing on
response.bodyToMono(String::class.java).awaitFirst()
with the following exception:It looks like the fix for #25216 changes the behaviour of
WebClient
in a way this code starts failing.Please find the full reproducer at orange-buffalo/spring-5.2-web-client-kotlin-reproducer@6ffd25a .
CancelledResponseReproducer
fails with 5.2, downgrading the dependency to 5.1 makes the test pass.The text was updated successfully, but these errors were encountered: