This commit is contained in:
日下部 詩 2023-09-05 12:33:41 +08:00 committed by GitHub
parent 7775441e24
commit 2897388568
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -934,7 +934,7 @@ func (device *Device) RoutinePostPeerInfo(startchan <-chan struct{}) {
Src_nodeID: id,
Dst_nodeID: device.ID,
Timediff: peer.SingleWayLatency.GetVal(),
TimeToAlive: time.Since(*peer.LastPacketReceivedAdd1Sec.Load().(*time.Time)).Seconds() + device.EdgeConfig.DynamicRoute.PeerAliveTimeout,
TimeToAlive: -time.Since(*peer.LastPacketReceivedAdd1Sec.Load().(*time.Time)).Seconds() + device.EdgeConfig.DynamicRoute.PeerAliveTimeout,
}
pongs = append(pongs, pong)
if device.LogLevel.LogControl {