File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed
src/main/java/com/cisco/trex/stateful/api/lowlevel Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -345,6 +345,9 @@ public void recv(int bytes, boolean clear) {
345345 * @param clear
346346 */
347347 public void recv (long bytes , boolean clear ) {
348+ if (clear ) {
349+ this .totalRcvBytes = 0 ;
350+ }
348351 this .totalRcvBytes += bytes ;
349352 fields .get (COMMANDS ).add (new ASTFCmdRecv (totalRcvBytes , clear ));
350353 }
@@ -388,6 +391,9 @@ public void recvMsg(int pkts, boolean clear) {
388391 * @param clear when reach the watermark clear the flow counter
389392 */
390393 public void recvMsg (long pkts , boolean clear ) {
394+ if (clear ) {
395+ this .totalRcvBytes = 0 ;
396+ }
391397 this .totalRcvBytes += pkts ;
392398 fields .get (COMMANDS ).add (new ASTFCmdRecvMsg (this .totalRcvBytes , clear ));
393399 }
You can’t perform that action at this time.
0 commit comments