// ForceSend forces send cycle, used in tests, returns
// nil in case of success, error otherwise
ForceSend forces send cycle, used in tests, returns
nil in case of success, error otherwise
// ForceSend forces send cycle used in tests returns // nil in case of success error otherwise
func (h *Heartbeat) ForceSend(timeout time.Duration) error {
	timeoutC := time.After(timeout)
	select {
	case h.sendC <- struct{}{}:
	case <-timeoutC:
		return trace.ConnectionProblem(nil, "timeout waiting for send")
	}
	select {
	case <-h.announceC:
		return nil
	case <-timeoutC:
		return trace.ConnectionProblem(nil, "timeout waiting for announce to be sent")
	}
}
func ( h * Heartbeat ) ForceSend ( timeout time . Duration ) error { timeoutC := time . After ( timeout ) select { case h . sendC <- struct { } { } : case <- timeoutC : return trace . ConnectionProblem ( nil , " " ) } select { case <- h . announceC : return nil case <- timeoutC : return trace . ConnectionProblem ( nil , " " ) } }
ForceSend forces send cycle, used in tests, returns
nil in case of success, error otherwise
ForceSend forces send cycle used in tests returns nil in case of success error otherwise