From ea79b8edb03c28f4f2ad0f056098ce5862136e3e Mon Sep 17 00:00:00 2001 From: Nikita Kryuchkov Date: Thu, 18 Jul 2019 07:40:26 +0300 Subject: [PATCH] Fix a data race --- pkg/transport/manager.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/transport/manager.go b/pkg/transport/manager.go index f3727c1465..87369c77e3 100644 --- a/pkg/transport/manager.go +++ b/pkg/transport/manager.go @@ -317,7 +317,7 @@ func (tm *Manager) acceptTransport(ctx context.Context, factory Factory) (*Manag entry, err := settlementResponderHandshake().Do(tm, tr, 30*time.Second) if err != nil { go func() { - if err = tr.Close(); err != nil { + if err := tr.Close(); err != nil { tm.Logger.Warnf("Failed to close transport: %s", err) } }()