Commit 144a3a5b authored by Johann Fischer's avatar Johann Fischer Committed by Carles Cufi
Browse files

modbus: return ETIMEDOUT on timeout instead of EIO



Return ETIMEDOUT on timeout instead of EIO.

Signed-off-by: default avatarJohann Fischer <johann.fischer@nordicsemi.no>
parent 0bf4916e
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;