fix timeout test
This commit is contained in:
parent
9068c861f5
commit
503427031b
@ -84,7 +84,7 @@ func GenerateReport(dev *wgtypes.Device, conf *DsnetConfig, oldReport *DsnetRepo
|
||||
|
||||
if !known {
|
||||
status = StatusSyncRequired
|
||||
} else if wgPeer.LastHandshakeTime.After(time.Now().Add(-TIMEOUT)) {
|
||||
} else if time.Since(wgPeer.LastHandshakeTime) < TIMEOUT {
|
||||
status = StatusOnline
|
||||
// TODO same test but with rx byte data from last report (otherwise
|
||||
// peer can fake online status by disabling handshake)
|
||||
|
Loading…
Reference in New Issue
Block a user