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
be1a0dd7
Commit
be1a0dd7
authored
Aug 03, 2016
by
Jeromy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dht: add in code to detect and diagnose #3032
License: MIT Signed-off-by:
Jeromy
<
why@ipfs.io
>
parent
1bd98f05
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
0 deletions
+11
-0
routing.go
routing.go
+11
-0
No files found.
routing.go
View file @
be1a0dd7
...
...
@@ -3,6 +3,7 @@ package dht
import
(
"bytes"
"fmt"
"runtime"
"sync"
"time"
...
...
@@ -380,6 +381,16 @@ func (dht *IpfsDHT) findProvidersAsyncRoutine(ctx context.Context, key key.Key,
_
,
err
:=
query
.
Run
(
ctx
,
peers
)
if
err
!=
nil
{
log
.
Debugf
(
"Query error: %s"
,
err
)
// Special handling for issue: https://github.com/ipfs/go-ipfs/issues/3032
if
fmt
.
Sprint
(
err
)
==
"<nil>"
{
log
.
Error
(
"reproduced bug 3032:"
)
log
.
Errorf
(
"Errors type information: %#v"
,
err
)
log
.
Errorf
(
"go version: %s"
,
runtime
.
Version
())
log
.
Error
(
"please report this information to: https://github.com/ipfs/go-ipfs/issues/3032"
)
// replace problematic error with something that won't crash the daemon
err
=
fmt
.
Errorf
(
"<nil>"
)
}
notif
.
PublishQueryEvent
(
ctx
,
&
notif
.
QueryEvent
{
Type
:
notif
.
QueryError
,
Extra
:
err
.
Error
(),
...
...
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