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-merkledag
Commits
53eb8d06
Unverified
Commit
53eb8d06
authored
Nov 28, 2018
by
Steven Allen
Committed by
GitHub
Nov 28, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #21 from ipfs/fix/fetch-deadlock
fix a fetch deadlock on error
parents
ff7c0709
3b8c0ad4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
1 deletion
+9
-1
merkledag.go
merkledag.go
+4
-1
merkledag_test.go
merkledag_test.go
+5
-0
No files found.
merkledag.go
View file @
53eb8d06
...
...
@@ -397,7 +397,10 @@ func EnumerateChildrenAsyncDepth(ctx context.Context, getLinks GetLinks, c cid.C
if
shouldVisit
{
links
,
err
:=
getLinks
(
ctx
,
ci
)
if
err
!=
nil
{
errChan
<-
err
select
{
case
errChan
<-
err
:
case
<-
fetchersCtx
.
Done
()
:
}
return
}
...
...
merkledag_test.go
View file @
53eb8d06
...
...
@@ -677,6 +677,7 @@ func TestEnumerateAsyncFailsNotFound(t *testing.T) {
b
:=
NodeWithData
([]
byte
(
"foo2"
))
c
:=
NodeWithData
([]
byte
(
"foo3"
))
d
:=
NodeWithData
([]
byte
(
"foo4"
))
e
:=
NodeWithData
([]
byte
(
"foo5"
))
ds
:=
dstest
.
Mock
()
for
_
,
n
:=
range
[]
ipld
.
Node
{
a
,
b
,
c
}
{
...
...
@@ -703,6 +704,10 @@ func TestEnumerateAsyncFailsNotFound(t *testing.T) {
t
.
Fatal
(
err
)
}
if
err
:=
parent
.
AddNodeLink
(
"e"
,
e
);
err
!=
nil
{
t
.
Fatal
(
err
)
}
err
:=
ds
.
Add
(
ctx
,
parent
)
if
err
!=
nil
{
t
.
Fatal
(
err
)
...
...
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