Skip to content

Commit

Permalink
Merge pull request #279 from rheimus/master
Browse files Browse the repository at this point in the history
#254 Refresh timeout on transfer
  • Loading branch information
rheimus authored Jul 11, 2021
2 parents 905e4b0 + 28cdf4f commit 670df8d
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,7 @@ private void transferFile(Path file) throws IOException {
try (BufferedInputStream fis = new BufferedInputStream(Files.newInputStream(file), SyncConfig.getConfig().BUFFER_SIZE)) {
while ((bytesRead = fis.read(buffer)) > 0) {
os.write(buffer, 0, bytesRead);
setTimeout(FILE_SYNC_CLIENT_TIMEOUT_MS);
}
} catch (IOException e) {
clientLogger.debug(String.format("Failed to write file: %s", file));
Expand Down

0 comments on commit 670df8d

Please sign in to comment.