[FIXED] Panic when monitoring enabled on non 64bit architectures

This is due to an unaligned 64-bit atomic operation. Move the
field at top of structure with 64-bit aligned preceding fields.

Resolves #2011

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
This commit is contained in:
Ivan Kozlovic
2022-03-09 09:29:29 -07:00
parent 1712ee3707
commit dde235a92e

View File

@@ -107,7 +107,10 @@ type Info struct {
// Server is our main struct.
type Server struct {
// Fields accessed with atomic operations need to be 64-bit aligned
gcid uint64
// How often user logon fails due to the issuer account not being pinned.
pinnedAccFail uint64
stats
mu sync.Mutex
kp nkeys.KeyPair
@@ -266,9 +269,6 @@ type Server struct {
// Keep track of what that user name is for config reload purposes.
sysAccOnlyNoAuthUser string
// How often user logon fails due to the issuer account not being pinned.
pinnedAccFail uint64
// This is a central logger for IPQueues when the number of pending
// messages reaches a certain thresold (per queue)
ipqLog *srvIPQueueLogger