]> Cypherpunks.ru repositories - govpn.git/blobdiff - src/cypherpunks.ru/govpn/cmd/govpn-client/tcp.go
Let all counters will be unsigned, as sign does not mean anything
[govpn.git] / src / cypherpunks.ru / govpn / cmd / govpn-client / tcp.go
index 7e2b1a3db9db896d1fcf27b20dbe7ccc0f37db3b..dd353649ad4db37ee0f2a1b0b673b7e7d71b2a76 100644 (file)
@@ -151,7 +151,7 @@ TransportCycle:
                        timeouted <- struct{}{}
                        break TransportCycle
                }
-               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 TransportCycle