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-routing
Commits
1a344cc5
Commit
1a344cc5
authored
10 years ago
by
Juan Batiz-Benet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
respect don contexteone
parent
4296ca59
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
3 deletions
+4
-3
dht/dht_net.go
dht/dht_net.go
+1
-1
dht/dht_test.go
dht/dht_test.go
+2
-1
dht/ext_test.go
dht/ext_test.go
+1
-1
No files found.
dht/dht_net.go
View file @
1a344cc5
...
...
@@ -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
}
...
...
This diff is collapsed.
Click to expand it.
dht/dht_test.go
View file @
1a344cc5
...
...
@@ -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
)
...
...
This diff is collapsed.
Click to expand it.
dht/ext_test.go
View file @
1a344cc5
...
...
@@ -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
{
...
...
This diff is collapsed.
Click to expand it.
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