Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
dms3
go-dms3
Commits
08733c2b
Commit
08733c2b
authored
Oct 18, 2017
by
Jeromy Johnson
Committed by
GitHub
Oct 18, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #4317 from ipfs/feat/remove-bsnet-todo
NewStream now creates a connection if necessary
parents
d840f67e
d727a75e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
8 deletions
+0
-8
exchange/bitswap/network/ipfs_impl.go
exchange/bitswap/network/ipfs_impl.go
+0
-8
No files found.
exchange/bitswap/network/ipfs_impl.go
View file @
08733c2b
...
...
@@ -105,14 +105,6 @@ func (bsnet *impl) NewMessageSender(ctx context.Context, p peer.ID) (MessageSend
}
func
(
bsnet
*
impl
)
newStreamToPeer
(
ctx
context
.
Context
,
p
peer
.
ID
)
(
inet
.
Stream
,
error
)
{
// first, make sure we're connected.
// if this fails, we cannot connect to given peer.
//TODO(jbenet) move this into host.NewStream?
if
err
:=
bsnet
.
host
.
Connect
(
ctx
,
pstore
.
PeerInfo
{
ID
:
p
});
err
!=
nil
{
return
nil
,
err
}
return
bsnet
.
host
.
NewStream
(
ctx
,
p
,
ProtocolBitswap
,
ProtocolBitswapOne
,
ProtocolBitswapNoVers
)
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment