aboutsummaryrefslogtreecommitdiff
path: root/funcs.go
diff options
context:
space:
mode:
Diffstat (limited to 'funcs.go')
-rw-r--r--funcs.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/funcs.go b/funcs.go
index 2e2ad26..b7a2c29 100644
--- a/funcs.go
+++ b/funcs.go
@@ -23,7 +23,7 @@ var (
const (
profileFailedCommits = false
- sleepBetweenRetries = false
+ sleepBetweenRetries = true
)
func init() {
@@ -59,8 +59,8 @@ retry:
shift = maxShift
}
ns := int64(1) << shift
- ns = rand.Int63n(ns)
- if ns > 0 {
+ d := time.Duration(rand.Int63n(ns))
+ if d > 100*time.Microsecond {
tx.updateWatchers()
time.Sleep(time.Duration(ns))
}