Ensure vars used atomically in peer are aligned.
The sync.atomic requires alignment of variables used atomically on ARM. This commit moves the connected and disconnect variables in the peer struct up so they are aligned. Fixes #157.
This commit is contained in:
parent
458a996ae6
commit
764893c400
1 changed files with 2 additions and 2 deletions
4
peer.go
4
peer.go
|
@ -144,12 +144,12 @@ type peer struct {
|
|||
server *server
|
||||
btcnet btcwire.BitcoinNet
|
||||
started int32
|
||||
connected int32
|
||||
disconnect int32 // only to be used atomically
|
||||
conn net.Conn
|
||||
addr string
|
||||
na *btcwire.NetAddress
|
||||
inbound bool
|
||||
connected int32
|
||||
disconnect int32 // only to be used atomically
|
||||
persistent bool
|
||||
knownAddresses map[string]struct{}
|
||||
knownInventory *MruInventoryMap
|
||||
|
|
Loading…
Reference in a new issue