tq: TransferQueue flushes, but does not close the Meter
This commit is contained in:
parent
ba4a73d6a9
commit
8c59efb1e5
@ -258,6 +258,7 @@ func (c *uploadContext) CollectErrors(tqueues ...*tq.TransferQueue) {
|
||||
}
|
||||
|
||||
func (c *uploadContext) ReportErrors() {
|
||||
c.meter.Finish()
|
||||
for _, err := range c.otherErrs {
|
||||
FullError(err)
|
||||
}
|
||||
|
@ -163,6 +163,15 @@ func (m *Meter) FinishTransfer(name string) {
|
||||
m.fileIndexMutex.Unlock()
|
||||
}
|
||||
|
||||
// Flush sends the latest progress update, while leaving the meter active.
|
||||
func (m *Meter) Flush() {
|
||||
if m == nil {
|
||||
return
|
||||
}
|
||||
|
||||
m.update()
|
||||
}
|
||||
|
||||
// Finish shuts down the Meter.
|
||||
func (m *Meter) Finish() {
|
||||
if m == nil {
|
||||
|
@ -768,7 +768,7 @@ func (q *TransferQueue) Wait() {
|
||||
close(watcher)
|
||||
}
|
||||
|
||||
q.meter.Finish()
|
||||
q.meter.Flush()
|
||||
q.errorwait.Wait()
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user