diff --git a/p2p/server/msgserver.go b/p2p/server/msgserver.go index c1f632fb480..622f4311c3e 100644 --- a/p2p/server/msgserver.go +++ b/p2p/server/msgserver.go @@ -61,8 +61,7 @@ type ResponseHandlers struct { // MessageServer is a request-response multiplexer on top of the p2p layer. it provides a way to register // message types on top of a protocol and declare request and response handlers. it matches incoming responses to requests. type MessageServer struct { - log.Log - ReqID uint64 //request id + ReqID uint64 //request id (must be declared first to ensure 8 byte alignment on 32-bit systems, required by atomic operations) name string //server name network Service pendMutex sync.RWMutex @@ -74,6 +73,7 @@ type MessageServer struct { workerCount sync.WaitGroup workerLimiter chan struct{} exit chan struct{} + log.Log } // Service is the subset of method used by MessageServer for p2p communications.