aboutsummaryrefslogtreecommitdiffstats
path: root/peer.go
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2018-04-18 07:24:33 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2018-04-18 07:24:33 +0200
commiteb6728400ba656990aa4518dc4f5f2a6f0f19f8e (patch)
tree07582cbeda3eee2c9d0c75b03e635ff598793665 /peer.go
parentAlign 64-bit atomics (diff)
downloadwireguard-go-eb6728400ba656990aa4518dc4f5f2a6f0f19f8e.tar.xz
wireguard-go-eb6728400ba656990aa4518dc4f5f2a6f0f19f8e.zip
Use simple 16-bit integer for persistent keepalive
Races for this aren't a huge problem.
Diffstat (limited to 'peer.go')
-rw-r--r--peer.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/peer.go b/peer.go
index 3a4f5f2..8acdfbc 100644
--- a/peer.go
+++ b/peer.go
@@ -13,13 +13,14 @@ const (
)
type Peer struct {
- persistentKeepaliveInterval uint64
isRunning AtomicBool
mutex sync.RWMutex
keyPairs KeyPairs
handshake Handshake
device *Device
endpoint Endpoint
+ persistentKeepaliveInterval uint16
+ _ uint32 // padding for alignment
stats struct {
txBytes uint64 // bytes send to peer (endpoint)