Skip to content

Commit

Permalink
fix eager handshake (#19)
Browse files Browse the repository at this point in the history
  • Loading branch information
jancajthaml authored Jun 1, 2020
1 parent 7298cb2 commit d0399c9
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions system.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -370,7 +369,7 @@ func (s *System) handshake() {
}
return
case <-ticker.C:
continue
s.publish <- pingMessage
}
}
}
Expand Down

0 comments on commit d0399c9

Please sign in to comment.