mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-08 00:39:50 +03:00
ignore tx-read errors for higher offsets
This commit is contained in:
@@ -586,13 +586,16 @@ void TxService::retry_tx(const uint8_t operation, const uint8_t * data, const ui
|
|||||||
// have we reached the limit? if so, reset count and give up
|
// have we reached the limit? if so, reset count and give up
|
||||||
if (++retry_count_ > MAXIMUM_TX_RETRIES) {
|
if (++retry_count_ > MAXIMUM_TX_RETRIES) {
|
||||||
reset_retry_count(); // give up
|
reset_retry_count(); // give up
|
||||||
|
EMSESP::wait_validate(0); // do not wait for validation
|
||||||
if (operation == Telegram::Operation::TX_READ) {
|
if (operation == Telegram::Operation::TX_READ) {
|
||||||
|
if (telegram_last_->offset > 0) { // ignore errors for higher offsets
|
||||||
|
LOG_DEBUG(F("Last Tx Read operation failed after %d retries. Ignoring request: %s"), MAXIMUM_TX_RETRIES, telegram_last_->to_string().c_str());
|
||||||
|
return;
|
||||||
|
}
|
||||||
increment_telegram_read_fail_count(); // another Tx fail
|
increment_telegram_read_fail_count(); // another Tx fail
|
||||||
} else {
|
} else {
|
||||||
increment_telegram_write_fail_count(); // another Tx fail
|
increment_telegram_write_fail_count(); // another Tx fail
|
||||||
}
|
}
|
||||||
EMSESP::wait_validate(0); // do not wait for validation
|
|
||||||
|
|
||||||
LOG_ERROR(F("Last Tx %s operation failed after %d retries. Ignoring request: %s"),
|
LOG_ERROR(F("Last Tx %s operation failed after %d retries. Ignoring request: %s"),
|
||||||
(operation == Telegram::Operation::TX_WRITE) ? F("Write") : F("Read"),
|
(operation == Telegram::Operation::TX_WRITE) ? F("Write") : F("Read"),
|
||||||
MAXIMUM_TX_RETRIES,
|
MAXIMUM_TX_RETRIES,
|
||||||
|
|||||||
Reference in New Issue
Block a user