Skip to content

Commit

Permalink
Do not fill SetupTpChan in createTransport
Browse files Browse the repository at this point in the history
  • Loading branch information
nkryuchkov committed Jul 17, 2019
1 parent e9d9cc1 commit 5f072c6
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 11 deletions.
11 changes: 2 additions & 9 deletions pkg/transport/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -339,23 +339,16 @@ func (tm *Manager) createTransport(ctx context.Context, remote cipher.PubKey, tp
tm.transports[entry.ID] = mTr
tm.mu.Unlock()

var setupTpChan chan Transport
var dataTpChan chan *ManagedTransport

if tm.IsSetupTransport(tr) {
setupTpChan = tm.SetupTpChan
} else {
dataTpChan = tm.DataTpChan
return mTr, nil
}

select {
case <-tm.doneChan:
return nil, io.ErrClosedPipe
case dataTpChan <- mTr:
case tm.DataTpChan <- mTr:
go tm.manageTransport(ctx, mTr, factory, remote)
return mTr, nil
case setupTpChan <- mTr:
return mTr, nil
}
}

Expand Down
10 changes: 9 additions & 1 deletion vendor/github.com/skycoin/dmsg/client.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions vendor/github.com/skycoin/dmsg/transport.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion vendor/modules.txt
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,8 @@ golang.org/x/crypto/internal/subtle
golang.org/x/crypto/poly1305
# golang.org/x/net v0.0.0-20190620200207-3b0461eec859
golang.org/x/net/context
golang.org/x/net/proxy
golang.org/x/net/nettest
golang.org/x/net/proxy
golang.org/x/net/internal/socks
# golang.org/x/sys v0.0.0-20190626221950-04f50cda93cb
golang.org/x/sys/unix
Expand Down

0 comments on commit 5f072c6

Please sign in to comment.