Skip to content

Commit fac52c5

Browse files
committed
fix counter reset on restart
1 parent 4438ab9 commit fac52c5

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/ConsumerFMQchannel.cxx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,6 @@ class ConsumerFMQchannel : public Consumer
209209
std::unique_ptr<std::thread> senderThread; // this one empties the output FIFOs of the wThreads
210210
bool senderThreadIsRunning;
211211
int wThreadIxWrite = 0; // push data round-robin in wThreads
212-
int wThreadIxRead = 0; // read data round-robin in wThreads
213212
void cleanupThreads() {
214213
if (nwThreads) {
215214
wThreadShutdown = 1;
@@ -1372,6 +1371,8 @@ int ConsumerFMQchannel::start() {
13721371

13731372
currentTimeframeId = undefinedTimeframeId;
13741373

1374+
wThreadIxWrite = 0;
1375+
13751376
return Consumer::start();
13761377
}
13771378
int ConsumerFMQchannel::stop() {
@@ -1428,6 +1429,9 @@ int ConsumerFMQchannel::stop() {
14281429
theLog.log(LogInfoSupport_(3235), "Consumer %s - %llu incomplete TF dropped", name.c_str(), (unsigned long long)TFdropped);
14291430
}
14301431

1432+
// ensure wThread fifos in/out are empty
1433+
// this is done continuously in the (!isRunning) case of the worker threads and the sender thread
1434+
14311435
// wait threads completed
14321436
return Consumer::stop();
14331437
}

0 commit comments

Comments
 (0)