1
mirror of https://github.com/rclone/rclone synced 2024-12-23 14:23:44 +01:00
rclone/fs/accounting
Ankur Gupta f04520a6e3 operations: fix goroutine leak in case of copy retry
Whenever transfer.Account() is called, a new goroutine acc.averageLoop()
is started. This goroutine exits only when the channel acc.exit is closed.
acc.exit is closed when acc.Done() is called, which happens during tr.Done().

However, if tr.Reset is called during a copy low level retry, it replaces
the tr.acc, without calling acc.Done(), which results in the goroutine
mentioned above never exiting.

This commit calls acc.Done() during a tr.Reset()
2021-11-10 16:44:29 +00:00
..
accounting_other.go build: apply gofmt from golang 1.17 2021-09-09 20:43:59 +03:00
accounting_test.go fs: deglobalise the config #4685 2020-11-26 16:40:12 +00:00
accounting_unix.go build: apply gofmt from golang 1.17 2021-09-09 20:43:59 +03:00
accounting.go Remove github.com/pkg/errors and replace with std library version 2021-11-07 11:53:30 +00:00
inprogress.go fs: deglobalise the config #4685 2020-11-26 16:40:12 +00:00
prometheus.go docs: cleanup spelling of size and rate units 2021-04-27 02:25:52 +03:00
stats_groups_test.go stats: fix missing computation of transferQueueSize when summing up statistics group - fixes #5749 2021-11-05 15:33:00 +00:00
stats_groups.go stats: fix missing StatsInfo fields in the computation of the group sum 2021-11-05 15:33:00 +00:00
stats_test.go Remove github.com/pkg/errors and replace with std library version 2021-11-07 11:53:30 +00:00
stats.go stats: fix missing StatsInfo fields in the computation of the group sum 2021-11-05 15:33:00 +00:00
token_bucket_test.go Use binary prefixes for size and rate units 2021-04-27 02:25:52 +03:00
token_bucket.go Remove github.com/pkg/errors and replace with std library version 2021-11-07 11:53:30 +00:00
tpslimit_test.go fs/accounting: fix occasionally failing test on macOS 2021-02-07 14:59:53 +00:00
tpslimit.go accounting: factor --tpslimit code into accounting from fshttp 2021-01-08 10:29:57 +00:00
transfer.go operations: fix goroutine leak in case of copy retry 2021-11-10 16:44:29 +00:00
transfermap.go fs: deglobalise the config #4685 2020-11-26 16:40:12 +00:00