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
c60d0117
Commit
c60d0117
authored
Nov 05, 2014
by
Brian Tiger Chow
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(exchange) add context to DialPeer
parent
9d7e0bbd
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
3 deletions
+3
-3
exchange/bitswap/bitswap.go
exchange/bitswap/bitswap.go
+1
-1
exchange/bitswap/network/interface.go
exchange/bitswap/network/interface.go
+1
-1
exchange/bitswap/network/net_message_adapter.go
exchange/bitswap/network/net_message_adapter.go
+1
-1
No files found.
exchange/bitswap/bitswap.go
View file @
c60d0117
...
...
@@ -91,7 +91,7 @@ func (bs *bitswap) Block(parent context.Context, k u.Key) (*blocks.Block, error)
go
func
(
p
peer
.
Peer
)
{
log
.
Debugf
(
"bitswap dialing peer: %s"
,
p
)
err
:=
bs
.
sender
.
DialPeer
(
p
)
err
:=
bs
.
sender
.
DialPeer
(
ctx
,
p
)
if
err
!=
nil
{
log
.
Errorf
(
"Error sender.DialPeer(%s)"
,
p
)
return
...
...
exchange/bitswap/network/interface.go
View file @
c60d0117
...
...
@@ -12,7 +12,7 @@ import (
type
Adapter
interface
{
// DialPeer ensures there is a connection to peer.
DialPeer
(
peer
.
Peer
)
error
DialPeer
(
context
.
Context
,
peer
.
Peer
)
error
// SendMessage sends a BitSwap message to a peer.
SendMessage
(
...
...
exchange/bitswap/network/net_message_adapter.go
View file @
c60d0117
...
...
@@ -67,7 +67,7 @@ func (adapter *impl) HandleMessage(
return
outgoing
}
func
(
adapter
*
impl
)
DialPeer
(
p
peer
.
Peer
)
error
{
func
(
adapter
*
impl
)
DialPeer
(
ctx
context
.
Context
,
p
peer
.
Peer
)
error
{
return
adapter
.
net
.
DialPeer
(
p
)
}
...
...
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