Commit 88e38bad authored by Karel Hanák's avatar Karel Hanák

IqrfSpi: prevent unwanted listen thread shutdown

parent e372d595
Pipeline #3776 passed with stages
in 6 minutes and 46 seconds
......@@ -501,9 +501,6 @@ namespace iqrf {
while (m_runListenThread)
{
if (this->getState() == State::NotReady) {
THROW_EXC_TRC_WAR(std::logic_error, "SPI not initialized.");
}
int recData = 0;
......@@ -519,6 +516,10 @@ namespace iqrf {
int retval = spi_iqrf_getSPIStatus(&status);
if (retval == BASE_TYPES_LIB_NOT_INITIALIZED) {
THROW_EXC_TRC_WAR(std::logic_error, "SPI not initialized.");
}
if (BASE_TYPES_OPER_OK != retval) {
// report status failure
TRC_WARNING("spi_iqrf_getSPIStatus() failed: " << PAR(retval) << PAR_HEX(status.spiResultStat) << " try to continue listening ...");
......
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