Commit 630c6069 authored by Alejandro Homs Puron's avatar Alejandro Homs Puron Committed by Generic Bliss account for Control Software
Browse files

Limit ZMQ poll time to 2 sec after an abort:

* Acquisition does not dead-lock if dseries_end header is not received
parent dff653ff
......@@ -299,7 +299,11 @@ void Stream::_ZmqThread::_run_sequence()
bool continue_flag = true;
while(continue_flag) { // reading loop
DEB_TRACE() << "Enter poll";
zmq_poll(items,2,-1);
long timeout_ms = m_stopped ? 2000 : -1;
if (zmq_poll(items,2,timeout_ms) <= 0) {
DEB_ERROR() << "No (end) message received after Abort";
break;
}
DEB_TRACE() << "Exit poll";
if(items[0].revents & ZMQ_POLLIN) { // reading synchro pipe
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment