]> Cypherpunks.ru repositories - govpn.git/blobdiff - cmd/govpn-client/main.go
Add various statistics saved for each peer
[govpn.git] / cmd / govpn-client / main.go
index 119a03d3ddbfe0152e8b877e5478563abd926e07..774edd3b6b4c4dcb4a89074ce92e5684791ed58e 100644 (file)
@@ -93,7 +93,7 @@ func main() {
 
 MainCycle:
        for {
-               if peer != nil && peer.Bytes > govpn.MaxBytesPerKey {
+               if peer != nil && (peer.BytesIn+peer.BytesOut) > govpn.MaxBytesPerKey {
                        peer.Zero()
                        peer = nil
                        handshake = govpn.HandshakeStart(conn, remote, id, key)