func (s *Server) heartbeatPresence() {
	sleepTime := defaults.ServerHeartbeatTTL/2 + utils.RandomDuration(defaults.ServerHeartbeatTTL/10)
	ticker := time.NewTicker(sleepTime)
	defer ticker.Stop()

	for {
		if err := s.registerServer(); err != nil {
			log.Warningf("failed to announce %v presence: %v", s.ID(), err)
		}
		select {
		case <-ticker.C:
			continue
		case <-s.closer.C:
			{
				log.Debugf("server.heartbeatPresence() exited")
				return
			}
		}
	}
}
// heartbeatPresence periodically calls into the auth server to let everyone
// know we're up & alive
heartbeatPresence periodically calls into the auth server to let everyone
know we're up & alive
// heartbeatPresence periodically calls into the auth server to let everyone // know we ' re up & alive
func (s *Server) heartbeatPresence() {
	sleepTime := defaults.ServerHeartbeatTTL/2 + utils.RandomDuration(defaults.ServerHeartbeatTTL/10)
	ticker := time.NewTicker(sleepTime)
	defer ticker.Stop()
	for {
		if err := s.registerServer(); err != nil {
			log.Warningf("failed to announce %v presence: %v", s.ID(), err)
		}
		select {
		case <-ticker.C:
			continue
		case <-s.closer.C:
			{
				log.Debugf("server.heartbeatPresence() exited")
				return
			}
		}
	}
}
func ( s * Server ) heartbeatPresence ( ) { sleepTime := defaults . ServerHeartbeatTTL / 2 + utils . RandomDuration ( defaults . ServerHeartbeatTTL / 10 ) ticker := time . NewTicker ( sleepTime ) defer ticker . Stop ( ) for { if err := s . registerServer ( ) ; err != nil { log . Warningf ( " " , s . ID ( ) , err ) } select { case <- ticker . C : continue case <- s . closer . C : { log . Debugf ( " " ) return } } } }
heartbeatPresence periodically calls into the auth server to let everyone
know we're up & alive
heartbeatPresence periodically calls into the auth server to let everyone know we ' re up & alive