Align 64-bit atomics
64-bit varibles that are accessed using the Go atomic functions must be 8-byte aligned on 32-bit platforms. Otherwise there are crashes.
This commit is contained in:
parent
6cecaf3157
commit
099219be2a
|
@ -14,10 +14,10 @@ import (
|
||||||
*/
|
*/
|
||||||
|
|
||||||
type KeyPair struct {
|
type KeyPair struct {
|
||||||
|
sendNonce uint64
|
||||||
send cipher.AEAD
|
send cipher.AEAD
|
||||||
receive cipher.AEAD
|
receive cipher.AEAD
|
||||||
replayFilter ReplayFilter
|
replayFilter ReplayFilter
|
||||||
sendNonce uint64
|
|
||||||
isInitiator bool
|
isInitiator bool
|
||||||
created time.Time
|
created time.Time
|
||||||
localIndex uint32
|
localIndex uint32
|
||||||
|
|
2
peer.go
2
peer.go
|
@ -13,9 +13,9 @@ const (
|
||||||
)
|
)
|
||||||
|
|
||||||
type Peer struct {
|
type Peer struct {
|
||||||
|
persistentKeepaliveInterval uint64
|
||||||
isRunning AtomicBool
|
isRunning AtomicBool
|
||||||
mutex sync.RWMutex
|
mutex sync.RWMutex
|
||||||
persistentKeepaliveInterval uint64
|
|
||||||
keyPairs KeyPairs
|
keyPairs KeyPairs
|
||||||
handshake Handshake
|
handshake Handshake
|
||||||
device *Device
|
device *Device
|
||||||
|
|
Loading…
Reference in a new issue