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.
remoteFile
1 parent 91a4a63 commit c0308dfCopy full SHA for c0308df
src/main/java/org/embulk/output/sftp/SftpUtils.java
@@ -160,13 +160,11 @@ public Void call() throws Exception
160
final BufferedOutputStream outputStream = openStream(remoteFile);
161
// When channel is broken, closing resource may hang, hence the time-out wrapper
162
// Note: closing FileObject will also close OutputStream
163
- try (TimeoutCloser ignored = new TimeoutCloser(outputStream)) {
+ try (final TimeoutCloser ignored1 = new TimeoutCloser(outputStream);
164
+ final TimeoutCloser ignored2 = new TimeoutCloser(remoteFile)) {
165
appendFile(localTempFile, remoteFile, outputStream);
166
return null;
167
}
- finally {
168
- remoteFile.close();
169
- }
170
171
});
172
0 commit comments