Open pablozg opened 4 years ago
Looking into it. Multiple solutions to this issue.
Could you comment out clearing the _toSend
queue in _clearQueue
?
Hi, I had to change the function like this to avoid the "loadprohibited" error, because after comment out the first "_toSend while", the error still happening.
void esp32ModbusTCP::_clearQueue(esp32Modbus::Error error) {
if (xSemaphoreTake(_semaphore, 1000) == pdTRUE) {
while(!_toSend.empty()) {
//_tryError(_toSend.front().request->getId(), error, _toSend.front().arg);
_toSend.pop_front();
}
while(!_toReceive.empty()) {
//_tryError(_toSend.front().request->getId(), error, _toReceive.front().arg);
_toReceive.pop_front();
}
xSemaphoreGive(_semaphore);
} else {
log_e("couldn't obtain semaphore");
return;
}
}
Hi, sometimes I have an issue when tcp timeout occurs,
and the exception decoder output: