From 4073c3b7ce2d780e7a58c0354a7d3a30b08d7abd Mon Sep 17 00:00:00 2001 From: Nikita Kryuchkov Date: Mon, 15 Jul 2019 15:40:36 +0300 Subject: [PATCH] Do not perform settlement responder handshake if transport type is setup --- pkg/transport/manager.go | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/pkg/transport/manager.go b/pkg/transport/manager.go index a40dbb37bb..bf55c00bea 100644 --- a/pkg/transport/manager.go +++ b/pkg/transport/manager.go @@ -338,10 +338,15 @@ func (tm *Manager) acceptTransport(ctx context.Context, factory Factory) (*Manag return nil, errors.New("transport.Manager is closing. Skipping incoming transport") } - entry, err := settlementResponderHandshake().Do(tm, tr, 30*time.Second) - if err != nil { - tr.Close() - return nil, err + var entry *Entry + if tm.IsSetupTransport(tr) { + entry = makeEntry(tr, false) + } else { + entry, err = settlementResponderHandshake().Do(tm, tr, 30*time.Second) + if err != nil { + tr.Close() + return nil, err + } } remote, ok := tm.Remote(tr.Edges())