]> Cypherpunks.ru repositories - govpn.git/blobdiff - src/cypherpunks.ru/govpn/cmd/govpn-client/udp.go
Let all counters will be unsigned, as sign does not mean anything
[govpn.git] / src / cypherpunks.ru / govpn / cmd / govpn-client / udp.go
index 3d0c421bd4168683ade366abf0bc54302affc2a7..c70cf46c1ea2c3e8a22b5f8fdded82ef43b7a243 100644 (file)
@@ -70,7 +70,7 @@ MainCycle:
                                log.Println("Unauthenticated packet")
                                timeouts++
                        }
-                       if atomic.LoadInt64(&peer.BytesIn)+atomic.LoadInt64(&peer.BytesOut) > govpn.MaxBytesPerKey {
+                       if atomic.LoadUint64(&peer.BytesIn)+atomic.LoadUint64(&peer.BytesOut) > govpn.MaxBytesPerKey {
                                log.Println("Need rehandshake")
                                rehandshaking <- struct{}{}
                                break MainCycle