Ensure that when OutputStream is returned from StandardProcessSession.write, upon close of the OutputStream we close the underlying resources.
This closes
@@ -2824,6 +2824,9 @@ public class StandardProcessSession implements ProcessSession, ProvenanceEventEn
}
closed = true;
+
+ countingOut.close();
+ rawStream.close();
writeRecursionSet.remove(sourceFlowFile);
final long bytesWritten = countingOut.getBytesWritten();
