Check for offline in network requests, not for running to allow initial requests during network start

pull/10/head
Simon Stürz 2020-11-19 13:51:18 +01:00
parent 4b7e6a0ddb
commit 6f04230028
2 changed files with 2 additions and 2 deletions

View File

@ -72,7 +72,7 @@ ZigbeeNetworkReply *ZigbeeNetworkDeconz::sendRequest(const ZigbeeNetworkRequest
}); });
// Finish the reply right the way if the network is offline // Finish the reply right the way if the network is offline
if (!m_controller->available() || state() != ZigbeeNetwork::StateRunning) { if (!m_controller->available() || state() == ZigbeeNetwork::StateOffline) {
finishNetworkReply(reply, ZigbeeNetworkReply::ErrorNetworkOffline); finishNetworkReply(reply, ZigbeeNetworkReply::ErrorNetworkOffline);
return reply; return reply;
} }

View File

@ -81,7 +81,7 @@ ZigbeeNetworkReply *ZigbeeNetworkNxp::sendRequest(const ZigbeeNetworkRequest &re
}); });
// Finish the reply right the way if the network is offline // Finish the reply right the way if the network is offline
if (!m_controller->available() || state() != ZigbeeNetwork::StateRunning) { if (!m_controller->available() || state() == ZigbeeNetwork::StateOffline) {
finishNetworkReply(reply, ZigbeeNetworkReply::ErrorNetworkOffline); finishNetworkReply(reply, ZigbeeNetworkReply::ErrorNetworkOffline);
return reply; return reply;
} }