From e8193ec201c9db3a7ff12418268b42be35cbc8fb Mon Sep 17 00:00:00 2001 From: Chris Lu Date: Thu, 5 May 2016 10:37:33 -0700 Subject: [PATCH] return nil if no error fix https://github.com/chrislusf/seaweedfs/issues/299 --- go/topology/store_replicate.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/go/topology/store_replicate.go b/go/topology/store_replicate.go index 95799e497..f67ea7732 100644 --- a/go/topology/store_replicate.go +++ b/go/topology/store_replicate.go @@ -107,6 +107,9 @@ func (dr DistributedOperationResult) Error() error { errs = append(errs, fmt.Sprintf("[%s]: %v", k, v)) } } + if len(errs) == 0 { + return nil + } return errors.New(strings.Join(errs, "\n")) }