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:
Dave Collins 2014-07-23 14:12:06 -05:00
parent 458a996ae6
commit 764893c400

View file

@ -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