}
if atomic.LoadInt64(&peer.BytesIn)+atomic.LoadInt64(&peer.BytesOut) > govpn.MaxBytesPerKey {
log.Println("Need rehandshake")
- terminator <- struct{}{}
- terminator = nil
rehandshaking <- struct{}{}
break MainCycle
}
continue
}
- if govpn.IDsCache.Find(buf[:n]) == nil {
+ if idsCache.Find(buf[:n]) == nil {
log.Println("Invalid identity in handshake packet")
continue
}
if hs != nil {
hs.Zero()
}
+ conn.Close()
}