We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 4e6532f + b242217 commit 08bc959Copy full SHA for 08bc959
spring-web/src/main/java/org/springframework/http/client/ReactorNettyClientResponse.java
@@ -27,6 +27,7 @@
27
import org.springframework.http.HttpStatusCode;
28
import org.springframework.http.support.Netty4HeadersAdapter;
29
import org.springframework.lang.Nullable;
30
+import org.springframework.util.StreamUtils;
31
32
/**
33
* {@link ClientHttpResponse} implementation for the Reactor-Netty HTTP client.
@@ -89,7 +90,13 @@ public InputStream getBody() throws IOException {
89
90
91
@Override
92
public void close() {
- this.connection.dispose();
93
+ try{
94
+ InputStream body = getBody();
95
+ StreamUtils.drain(body);
96
+ body.close();
97
+ }
98
+ catch (IOException ignored) {
99
100
}
101
102
0 commit comments