diff --git a/fairmq/zeromq/FairMQSocketZMQ.cxx b/fairmq/zeromq/FairMQSocketZMQ.cxx index 15ce5d2c..ee2eba7c 100644 --- a/fairmq/zeromq/FairMQSocketZMQ.cxx +++ b/fairmq/zeromq/FairMQSocketZMQ.cxx @@ -146,7 +146,6 @@ int64_t FairMQSocketZMQ::Send(const vector>& msgVec, c if (nbytes >= 0) { totalSize += nbytes; - fBytesTx += nbytes; } else { @@ -186,6 +185,7 @@ int64_t FairMQSocketZMQ::Send(const vector>& msgVec, c // store statistics on how many messages have been sent (handle all parts as a single message) ++fMessagesTx; + fBytesTx += totalSize; return totalSize; } // If there's only one part, send it as a regular message else if (msgVec.size() == 1) @@ -247,7 +247,6 @@ int64_t FairMQSocketZMQ::Receive(vector>& msgVec, cons { msgVec.push_back(move(part)); totalSize += nbytes; - fBytesRx += nbytes; } else { @@ -261,6 +260,7 @@ int64_t FairMQSocketZMQ::Receive(vector>& msgVec, cons // store statistics on how many messages have been received (handle all parts as a single message) ++fMessagesRx; + fBytesRx += totalSize; return totalSize; }