@cryptotaxi247 / kubo / commits / de61d663b

fix(race condition)

https://github.com/jbenet/go-ipfs/issues/270

Brian Tiger Chow committed Nov 5, 2014 at 08:38 UTC de61d663b5e43ef7c1a0dffc17c2aefbad68ca6d
1 file changed +3 -3
fuse/ipns/ipns_test.go
+3 -3
@@ -239,17 +239,17 @@ func TestFastRepublish(t *testing.T) {
239 }
240
241 // constantly keep writing to the file
242 - go func() {
242 + go func(timeout time.Duration) {
243 for {
244 select {
245 case <-closed:
246 return
247
248 - case <-time.After(shortRepublishTimeout * 8 / 10):
248 + case <-time.After(timeout * 8 / 10):
249 writeFileData(t, dataB, fname)
250 }
251 }
252 - }()
252 + }(shortRepublishTimeout)
253
254 hasPublished := func() bool {
255 res, err := node.Namesys.Resolve(pubkeyHash)