mirror of
https://github.com/restic/restic.git
synced 2026-11-19 12:15:22 +00:00
Progress: Use reference to sync.Once
This commit is contained in:
1 parent
514a43f74b
commit
7faf272996
1 file changed
+2
-2
@@ -19,7 +19,7 @@ type Progress struct {
|
||||
start time.Time
|
||||
c *time.Ticker
|
||||
cancel chan struct{}
|
||||
o sync.Once
|
||||
o *sync.Once
|
||||
d time.Duration
|
||||
lastUpdate time.Time
|
||||
|
||||
@@ -52,7 +52,7 @@ func (p *Progress) Start() {
|
||||
return
|
||||
}
|
||||
|
||||
p.o = sync.Once{}
|
||||
p.o = &sync.Once{}
|
||||
p.cancel = make(chan struct{})
|
||||
p.running = true
|
||||
p.Reset()
|
||||
|
||||
Reference in new issue
Block a user