(c *configMaps)
| 729 | } |
| 730 | |
| 731 | func (l *peerLifecycle) setLostTimer(c *configMaps) { |
| 732 | if l.lostTimer != nil { |
| 733 | l.lostTimer.Stop() |
| 734 | } |
| 735 | ttl := lostTimeout - c.clock.Since(l.lastHandshake) |
| 736 | if ttl <= 0 { |
| 737 | ttl = time.Nanosecond |
| 738 | } |
| 739 | l.lostTimer = c.clock.AfterFunc(ttl, func() { |
| 740 | c.peerLostTimeout(l.peerID) |
| 741 | }) |
| 742 | } |
| 743 | |
| 744 | const readyForHandshakeTimeout = 5 * time.Second |
| 745 |
no test coverage detected