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
p2p
go-p2p-kad-dht
Commits
b3a6834b
Commit
b3a6834b
authored
Dec 24, 2014
by
Juan Batiz-Benet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
respect don contexteone
parent
e5502938
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
3 deletions
+4
-3
dht_net.go
dht_net.go
+1
-1
dht_test.go
dht_test.go
+2
-1
ext_test.go
ext_test.go
+1
-1
No files found.
dht_net.go
View file @
b3a6834b
...
...
@@ -31,7 +31,7 @@ func (dht *IpfsDHT) handleNewMessage(s inet.Stream) {
// receive msg
pmes
:=
new
(
pb
.
Message
)
if
err
:=
r
.
ReadMsg
(
pmes
);
err
!=
nil
{
log
.
Error
(
"Error unmarshaling data
"
)
log
.
Error
f
(
"Error unmarshaling data
: %s"
,
err
)
return
}
...
...
dht_test.go
View file @
b3a6834b
...
...
@@ -265,7 +265,8 @@ func TestBootstrap(t *testing.T) {
}
t
.
Logf
(
"bootstrapping them so they find each other"
,
nDHTs
)
bootstrap
(
t
,
ctx
,
dhts
)
ctxT
,
_
:=
context
.
WithTimeout
(
ctx
,
5
*
time
.
Second
)
bootstrap
(
t
,
ctxT
,
dhts
)
// the routing tables should be full now. let's inspect them.
t
.
Logf
(
"checking routing table of %d"
,
nDHTs
)
...
...
ext_test.go
View file @
b3a6834b
...
...
@@ -73,7 +73,7 @@ func TestGetFailures(t *testing.T) {
})
// This one should fail with NotFound
ctx2
,
_
:=
context
.
WithTimeout
(
context
.
Background
(),
time
.
Second
)
ctx2
,
_
:=
context
.
WithTimeout
(
context
.
Background
(),
3
*
time
.
Second
)
_
,
err
=
d
.
GetValue
(
ctx2
,
u
.
Key
(
"test"
))
if
err
!=
nil
{
if
err
!=
routing
.
ErrNotFound
{
...
...
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