aboutsummaryrefslogtreecommitdiff
path: root/hotline/transfer.go
diff options
context:
space:
mode:
authorJeff Halter <868228+jhalter@users.noreply.github.com>2022-06-26 08:31:18 -0700
committerJeff Halter <868228+jhalter@users.noreply.github.com>2022-06-26 08:31:18 -0700
commit1a7d1fb948f08e940aed67070f5313799f19e6d0 (patch)
treea5613b25246da47c87efa8b84074ea7b2c8f6211 /hotline/transfer.go
parent1632959187e9c7d8946126914af99270fc14d40a (diff)
Fix file upload stall
Diffstat (limited to 'hotline/transfer.go')
-rw-r--r--hotline/transfer.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/hotline/transfer.go b/hotline/transfer.go
index 4c80581..2acb5d6 100644
--- a/hotline/transfer.go
+++ b/hotline/transfer.go
@@ -42,7 +42,7 @@ func receiveFile(r io.Reader, targetFile, resForkFile, infoFork, counterWriter i
return err
}
- if _, err = io.Copy(targetFile, io.TeeReader(r, counterWriter)); err != nil {
+ if _, err = io.CopyN(targetFile, io.TeeReader(r, counterWriter), ffo.dataSize()); err != nil {
return err
}
@@ -51,7 +51,7 @@ func receiveFile(r io.Reader, targetFile, resForkFile, infoFork, counterWriter i
return err
}
- if _, err = io.Copy(resForkFile, io.TeeReader(r, counterWriter)); err != nil {
+ if _, err = io.CopyN(resForkFile, io.TeeReader(r, counterWriter), ffo.rsrcSize()); err != nil {
return err
}
}