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
d727a75e
Commit
d727a75e
authored
Oct 17, 2017
by
Steven Allen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
NewStream now creates a connection if necessary
License: MIT Signed-off-by:
Steven Allen
<
steven@stebalien.com
>
parent
d840f67e
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 @
d727a75e
...
...
@@ -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