Skip to content

Commit

Permalink
fix(race condition)
Browse files Browse the repository at this point in the history
  • Loading branch information
Brian Tiger Chow committed Nov 5, 2014
1 parent 9c2f770 commit c897f91
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions fuse/ipns/ipns_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -239,17 +239,17 @@ func TestFastRepublish(t *testing.T) {
}

// constantly keep writing to the file
go func() {
go func(timeout time.Duration) {
for {
select {
case <-closed:
return

case <-time.After(shortRepublishTimeout * 8 / 10):
case <-time.After(timeout * 8 / 10):
writeFileData(t, dataB, fname)
}
}
}()
}(shortRepublishTimeout)

hasPublished := func() bool {
res, err := node.Namesys.Resolve(pubkeyHash)
Expand Down

0 comments on commit c897f91

Please sign in to comment.