From d0399c91f905e072bf4b72e8d9af849569b60f26 Mon Sep 17 00:00:00 2001 From: Jan Cajthaml Date: Mon, 1 Jun 2020 06:52:07 +0200 Subject: [PATCH] fix eager handshake (#19) --- system.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/system.go b/system.go index 0333954..bd78bb8 100644 --- a/system.go +++ b/system.go @@ -352,10 +352,9 @@ func (s *System) handshake() { var stash []string pingMessage := s.Name + " ]" - ticker := time.NewTicker(500 * time.Millisecond) + ticker := time.NewTicker(400 * time.Millisecond) for { - s.publish <- pingMessage select { case <-s.Done(): return @@ -370,7 +369,7 @@ func (s *System) handshake() { } return case <-ticker.C: - continue + s.publish <- pingMessage } } }