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-bitswap
Commits
fc8168f6
Commit
fc8168f6
authored
Nov 05, 2014
by
Brian Tiger Chow
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(net) pass contexts to dial peer
parent
54b7ba45
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
network/net_message_adapter.go
network/net_message_adapter.go
+1
-1
testnet/network.go
testnet/network.go
+1
-1
No files found.
network/net_message_adapter.go
View file @
fc8168f6
...
...
@@ -68,7 +68,7 @@ func (adapter *impl) HandleMessage(
}
func
(
adapter
*
impl
)
DialPeer
(
ctx
context
.
Context
,
p
peer
.
Peer
)
error
{
return
adapter
.
net
.
DialPeer
(
p
)
return
adapter
.
net
.
DialPeer
(
ctx
,
p
)
}
func
(
adapter
*
impl
)
SendMessage
(
...
...
testnet/network.go
View file @
fc8168f6
...
...
@@ -163,7 +163,7 @@ func (nc *networkClient) SendRequest(
return
nc
.
network
.
SendRequest
(
ctx
,
nc
.
local
,
to
,
message
)
}
func
(
nc
*
networkClient
)
DialPeer
(
p
peer
.
Peer
)
error
{
func
(
nc
*
networkClient
)
DialPeer
(
ctx
context
.
Context
,
p
peer
.
Peer
)
error
{
// no need to do anything because dialing isn't a thing in this test net.
if
!
nc
.
network
.
HasPeer
(
p
)
{
return
fmt
.
Errorf
(
"Peer not in network: %s"
,
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