From 764893c4008681467a171d30315ddecc021be87c Mon Sep 17 00:00:00 2001 From: Dave Collins Date: Wed, 23 Jul 2014 14:12:06 -0500 Subject: [PATCH] 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. --- peer.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/peer.go b/peer.go index 7cf8c01b..97a9e319 100644 --- a/peer.go +++ b/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