Skip to content

Commit

Permalink
Do not perform settlement responder handshake if transport type is setup
Browse files Browse the repository at this point in the history
  • Loading branch information
nkryuchkov committed Jul 15, 2019
1 parent d24934f commit 4073c3b
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions pkg/transport/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand Down

0 comments on commit 4073c3b

Please sign in to comment.