Check for offline in network requests, not for running to allow initial requests during network start
parent
4b7e6a0ddb
commit
6f04230028
|
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue