From c0960c997d0e727365ab28569a12afb68c796e28 Mon Sep 17 00:00:00 2001 From: Michal Kuratczyk Date: Wed, 4 Oct 2023 09:50:46 +0200 Subject: [PATCH] Remove unnecessary sleep --- pkg/stomp_client/publisher.go | 4 ---- 1 file changed, 4 deletions(-) diff --git a/pkg/stomp_client/publisher.go b/pkg/stomp_client/publisher.go index 09248a8..a0a7ab8 100644 --- a/pkg/stomp_client/publisher.go +++ b/pkg/stomp_client/publisher.go @@ -29,10 +29,6 @@ type StompPublisher struct { } func NewPublisher(cfg config.Config, id int) *StompPublisher { - // sleep random interval to avoid all publishers publishing at exactly the same time - s := rand.Intn(cfg.Publishers) - time.Sleep(time.Duration(s) * time.Millisecond) - conn, err := stomp.Dial("tcp", cfg.PublisherUri, opts...) if err != nil { log.Error("publisher connection failed", "protocol", "STOMP", "publisherId", id, "error", err.Error())