ok2c commented on code in PR #744:
URL:
https://github.com/apache/httpcomponents-core/pull/744#discussion_r4515785741
##########
httpcore5/src/main/java/org/apache/hc/core5/http/impl/io/DefaultBHttpClientConnection.java:
##########
@@ -281,11 +282,22 @@ public void close() throws IOException {
socketOutputStream.close();
}
- }, entity.getTrailers())) {
- entity.writeTo(outStream);
Review Comment:
@arturobernalg This makes my eyes weep blood. Can we try to make it a bit
less hideous?
Something like this, while leaving everything else as is?
```
try {
entity.writeTo(outStream);
outStream.close();
} catch (final IOException ex) {
this.consistent = false;
close(CloseMode.IMMEDIATE);
throw ex;
}
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]