modbus: return ETIMEDOUT on timeout instead of EIO
Return ETIMEDOUT on timeout instead of EIO. Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
This commit is contained in:
parent
0bf4916efd
commit
144a3a5ba2
1 changed files with 1 additions and 1 deletions
|
@ -124,7 +124,7 @@ int modbus_tx_wait_rx_adu(struct modbus_context *ctx)
|
|||
|
||||
if (k_sem_take(&ctx->client_wait_sem, K_USEC(ctx->rxwait_to)) != 0) {
|
||||
LOG_WRN("Client wait-for-RX timeout");
|
||||
return -EIO;
|
||||
return -ETIMEDOUT;
|
||||
}
|
||||
|
||||
return ctx->rx_adu_err;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue