Closed psampaz closed 2 years ago
jitteredDuration introduced in https://github.com/adjust/rmq/pull/116 uses rand.NewSource which is not safe for concurrent use by multiple goroutines. https://github.com/golang/go/blob/8f53fad035ccc580859f7b063ae8be30b009a6be/src/math/rand/rand.go#L41
This PR updates jitterredDuration to use the default rand (the default Source is safe for concurrent use by multiple goroutines) which is already seeded in https://github.com/adjust/rmq/blob/master/rand.go#L9
jitteredDuration introduced in https://github.com/adjust/rmq/pull/116 uses rand.NewSource which is not safe for concurrent use by multiple goroutines. https://github.com/golang/go/blob/8f53fad035ccc580859f7b063ae8be30b009a6be/src/math/rand/rand.go#L41
This PR updates jitterredDuration to use the default rand (the default Source is safe for concurrent use by multiple goroutines) which is already seeded in https://github.com/adjust/rmq/blob/master/rand.go#L9