peer: fix struct alignment

Integers used atomically MUST be aligned properly, otherwise the
sync library will crash on purpose. Therefore non-aligned struct
members must come later.
This commit is contained in:
Oliver Gugger 2020-05-21 11:28:49 +02:00
parent 64b8aa8f11
commit 42ac187932
No known key found for this signature in database
GPG Key ID: 8E4256593F177720

@ -114,8 +114,6 @@ type peer struct {
started int32
disconnect int32
cfg *Config
// The following fields are only meant to be used *atomically*
bytesReceived uint64
bytesSent uint64
@ -130,6 +128,8 @@ type peer struct {
// our last ping message. To be used atomically.
pingLastSend int64
cfg *Config
connReq *connmgr.ConnReq
conn net.Conn