mirror of
https://github.com/restic/restic.git
synced 2025-10-29 11:49:27 +00:00
Progress: Use reference to sync.Once
This commit is contained in:
@@ -19,7 +19,7 @@ type Progress struct {
|
|||||||
start time.Time
|
start time.Time
|
||||||
c *time.Ticker
|
c *time.Ticker
|
||||||
cancel chan struct{}
|
cancel chan struct{}
|
||||||
o sync.Once
|
o *sync.Once
|
||||||
d time.Duration
|
d time.Duration
|
||||||
lastUpdate time.Time
|
lastUpdate time.Time
|
||||||
|
|
||||||
@@ -52,7 +52,7 @@ func (p *Progress) Start() {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
p.o = sync.Once{}
|
p.o = &sync.Once{}
|
||||||
p.cancel = make(chan struct{})
|
p.cancel = make(chan struct{})
|
||||||
p.running = true
|
p.running = true
|
||||||
p.Reset()
|
p.Reset()
|
||||||
|
|||||||
Reference in New Issue
Block a user