Commit e372d595 authored by Karel Hanák's avatar Karel Hanák

IqrfSpi: stop listen thread if SPI not initialized

parent 56c0525a
Pipeline #3775 passed with stages
in 6 minutes and 50 seconds
......@@ -332,6 +332,9 @@ namespace iqrf {
return state = State::NotReady;
}
break;
case BASE_TYPES_LIB_NOT_INITIALIZED:
state = State::NotReady;
break;
default:
break;
}
......@@ -498,6 +501,10 @@ namespace iqrf {
while (m_runListenThread)
{
if (this->getState() == State::NotReady) {
THROW_EXC_TRC_WAR(std::logic_error, "SPI not initialized.");
}
int recData = 0;
// lock scope
......
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