From 7faf272996dde8d857427ca3f020eebc999fb3e0 Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Sun, 8 May 2016 13:04:58 +0200 Subject: [PATCH] Progress: Use reference to sync.Once --- src/restic/progress.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/restic/progress.go b/src/restic/progress.go index 7215a320..cca1a4e4 100644 --- a/src/restic/progress.go +++ b/src/restic/progress.go @@ -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()