From d3077df613dd4bd7b3479e9c3c2a69cadc5d2792 Mon Sep 17 00:00:00 2001 From: Mantas Vidutis Date: Wed, 24 Apr 2019 09:32:39 -0700 Subject: [PATCH] multierror pointer --- daemon.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/daemon.go b/daemon.go index 40985cf..40d352b 100644 --- a/daemon.go +++ b/daemon.go @@ -163,19 +163,19 @@ func clearUnixSockets(path ma.Multiaddr) error { } func (d *Daemon) Close() error { - var merr multierror.Error + var merr *multierror.Error if err := d.host.Close(); err != nil { - merr = *multierror.Append(err) + merr = multierror.Append(err) } listenAddr := d.listener.Multiaddr() if err := d.listener.Close(); err != nil { - merr = *multierror.Append(&merr, err) + merr = multierror.Append(merr, err) } if err := clearUnixSockets(listenAddr); err != nil { - merr = *multierror.Append(&merr, err) + merr = multierror.Append(merr, err) } - return multierror.Flatten(&merr) + return multierror.Flatten(merr) }