- 
                Notifications
    You must be signed in to change notification settings 
- Fork 38.8k
Closed
Labels
in: webIssues in web modules (web, webmvc, webflux, websocket)Issues in web modules (web, webmvc, webflux, websocket)type: enhancementA general enhancementA general enhancement
Milestone
Description
Rossen Stoyanchev opened SPR-15993 and commented
#20474 introduced a close method on ClientResponse and applied it automatically when body reading methods are used. However while investigating #20523 we realized the underlying dispose() on the Reactor HttpClientResponse is not meant to be called always but rather only as a means of cancelling or declaring that you won't read the body. Using dispose actually closes the connection and counteracts the benefits of using a connection pool.
We should remove the automatic calls to close (the .doAfterTerminate(response::close) when reading the body and probably also perhaps revisit the close() method behavior and name.
Affects: 5.0 RC4
Issue Links:
- WebClient doesn't reuse connections [SPR-16011] #20560 WebClient doesn't reuse connections ("is duplicated by")
- Ensure that WebClient disposes the HTTP client connection once the client response is consumed [SPR-15920] #20474 Ensure that WebClient disposes the HTTP client connection once the client response is consumed
- Fix behavior of ClientResponse bodyToMono and bodyToFlux with Void.class [SPR-16018] #20567 Fix behavior of ClientResponse bodyToMono and bodyToFlux with Void.class
Referenced from: commits 10139d4
1 votes, 2 watchers
Metadata
Metadata
Assignees
Labels
in: webIssues in web modules (web, webmvc, webflux, websocket)Issues in web modules (web, webmvc, webflux, websocket)type: enhancementA general enhancementA general enhancement