From 52932b03513788938b8cba6174b3b6800aa13510 Mon Sep 17 00:00:00 2001 From: "Sascha L. Teichmann" Date: Mon, 3 Nov 2014 18:57:10 +0100 Subject: [PATCH] Fixed bogus error handling in change tracking notification. --- cmd/mtredisalize/changetracker.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cmd/mtredisalize/changetracker.go b/cmd/mtredisalize/changetracker.go index 53a3c1f..413d4d0 100644 --- a/cmd/mtredisalize/changetracker.go +++ b/cmd/mtredisalize/changetracker.go @@ -41,7 +41,7 @@ func (ct *ChangeTracker) BlockChanged(key []byte) { ct.mutex.Unlock() } -func (ct *ChangeTracker) FlushChanges(url string) (err error) { +func (ct *ChangeTracker) FlushChanges(url string) { var oldChanges map[quantizedXZ]bool ct.mutex.Lock() if len(ct.changes) > 0 { @@ -59,6 +59,7 @@ func (ct *ChangeTracker) FlushChanges(url string) (err error) { changes[i] = change i++ } + var err error var buf bytes.Buffer encoder := json.NewEncoder(&buf) if err = encoder.Encode(changes); err != nil {