From ff8dfa8d3590b6f824550f47faa17fc88bfb2593 Mon Sep 17 00:00:00 2001 From: Derek Collison Date: Wed, 1 Jul 2020 07:33:34 -0700 Subject: [PATCH] Reordering for inbound processing Signed-off-by: Derek Collison --- server/client.go | 65 ++++++++++++++++++++++++------------------------ 1 file changed, 32 insertions(+), 33 deletions(-) diff --git a/server/client.go b/server/client.go index 09a7c403..5a115f72 100644 --- a/server/client.go +++ b/server/client.go @@ -192,44 +192,43 @@ type client struct { // when processing inbound messages and requires the lock we want to // check only when needed. This is set/get using atomic, so needs to // be memory aligned. - cgwrt int32 - mpay int32 - msubs int32 - mcl int32 - mu sync.Mutex - kind int - cid uint64 - opts clientOpts - start time.Time - nonce []byte - pubKey string - nc net.Conn - ncs string - out outbound - srv *Server - acc *Account - user *NkeyUser - host string - port uint16 - subs map[string]*subscription - perms *permissions - replies map[string]*resp - mperms *msgDeny - darray []string - in readCache - pcd map[*client]struct{} - atmr *time.Timer - ping pinfo - msgb [msgScratchSize]byte - last time.Time + cgwrt int32 + kind int + srv *Server + acc *Account + perms *permissions + in readCache parseState - headers bool + opts clientOpts + rrTracking *rrTracking + mpay int32 + msubs int32 + mcl int32 + mu sync.Mutex + cid uint64 + start time.Time + nonce []byte + pubKey string + nc net.Conn + ncs string + out outbound + user *NkeyUser + host string + port uint16 + subs map[string]*subscription + replies map[string]*resp + mperms *msgDeny + darray []string + pcd map[*client]struct{} + atmr *time.Timer + ping pinfo + msgb [msgScratchSize]byte + last time.Time + headers bool rtt time.Duration rttStart time.Time - rrTracking *rrTracking - route *route gw *gateway leaf *leaf