[
https://issues.apache.org/jira/browse/CAMEL-12487?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16467094#comment-16467094
]
ASF GitHub Bot commented on CAMEL-12487:
----------------------------------------
oscerd closed pull request #2326: CAMEL-12487: S3Producer must close the
streams it opens
URL: https://github.com/apache/camel/pull/2326
This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:
As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):
diff --git
a/components/camel-aws/src/main/java/org/apache/camel/component/aws/s3/S3Producer.java
b/components/camel-aws/src/main/java/org/apache/camel/component/aws/s3/S3Producer.java
index fc5c2354945..159eff64175 100644
---
a/components/camel-aws/src/main/java/org/apache/camel/component/aws/s3/S3Producer.java
+++
b/components/camel-aws/src/main/java/org/apache/camel/component/aws/s3/S3Producer.java
@@ -276,10 +276,11 @@ public void processSingleOp(final Exchange exchange)
throws Exception {
message.setHeader(S3Constants.VERSION_ID,
putObjectResult.getVersionId());
}
+ // close streams
+ IOHelper.close(putObjectRequest.getInputStream());
+ IOHelper.close(is);
+
if (getConfiguration().isDeleteAfterWrite() && filePayload != null) {
- // close streams
- IOHelper.close(putObjectRequest.getInputStream());
- IOHelper.close(is);
FileUtil.deleteFile(filePayload);
}
}
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
> S3Producer must close the streams it opens
> ------------------------------------------
>
> Key: CAMEL-12487
> URL: https://issues.apache.org/jira/browse/CAMEL-12487
> Project: Camel
> Issue Type: Bug
> Reporter: Damien B
> Priority: Major
>
> We've got a busy route with high memory pressure, we found out it was due to
> S3Producer not closing the streams it opened in some cases. SeeĀ
> [MR|https://github.com/apache/camel/pull/2321]
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)