fixed unlimited error messages in TbMsgGeneratorNode

This commit is contained in:
YevhenBondarenko 2021-02-15 15:16:11 +02:00 committed by Andrew Shvayka
parent a15e991d23
commit d5b28222a3

View File

@ -104,9 +104,10 @@ public class TbMsgGeneratorNode implements TbNode {
}
},
t -> {
if (initialized) {
if (initialized && (config.getMsgCount() == TbMsgGeneratorNodeConfiguration.UNLIMITED_MSG_COUNT || currentMsgCount < config.getMsgCount())) {
ctx.tellFailure(msg, t);
scheduleTickMsg(ctx);
currentMsgCount++;
}
});
}