From a57bfc4d56e59cf1d868675a825b9b4a2fceec4c Mon Sep 17 00:00:00 2001 From: Matthias Hanel Date: Fri, 13 Mar 2020 17:43:27 -0400 Subject: [PATCH] Remove double trace on split buffer The trace in question was not there prior to tracing change. Fixes #1310, by removing it. Signed-off-by: Matthias Hanel --- server/parser.go | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/server/parser.go b/server/parser.go index 0d4712c0..0a8d4263 100644 --- a/server/parser.go +++ b/server/parser.go @@ -921,7 +921,7 @@ func (c *client) parse(buf []byte) error { // read buffer and we are not able to process the msg. if c.argBuf == nil { // Works also for MSG_ARG, when message comes from ROUTE. - if err := c.clonePubArg(trace); err != nil { + if err := c.clonePubArg(); err != nil { goto parseErr } } @@ -973,26 +973,17 @@ func protoSnippet(start int, buf []byte) string { // clonePubArg is used when the split buffer scenario has the pubArg in the existing read buffer, but // we need to hold onto it into the next read. -func (c *client) clonePubArg(trace bool) error { +func (c *client) clonePubArg() error { // Just copy and re-process original arg buffer. c.argBuf = c.scratch[:0] c.argBuf = append(c.argBuf, c.pa.arg...) switch c.kind { case ROUTER, GATEWAY: - if trace { - c.traceInOp("RMSG", c.argBuf) - } return c.processRoutedMsgArgs(c.argBuf) case LEAF: - if trace { - c.traceInOp("LMSG", c.argBuf) - } return c.processLeafMsgArgs(c.argBuf) default: - if trace { - c.traceInOp("PUB", c.argBuf) - } return c.processPub(c.argBuf) } }