From a9ad6f4d7c3805f21bcc5e7a7531a73d96458892 Mon Sep 17 00:00:00 2001 From: Xu Si Yu Date: Wed, 27 May 2026 18:39:59 +0800 Subject: [PATCH] fix(openthread): avoid HDLC TX stall on fd write failure --- components/openthread/src/port/esp_openthread_uart.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/components/openthread/src/port/esp_openthread_uart.c b/components/openthread/src/port/esp_openthread_uart.c index 0cc11e85167..02b5967c1d3 100644 --- a/components/openthread/src/port/esp_openthread_uart.c +++ b/components/openthread/src/port/esp_openthread_uart.c @@ -50,12 +50,10 @@ otError otPlatUartSend(const uint8_t *buf, uint16_t buf_length) { int rval = write(s_uart_fd, buf, buf_length); + otPlatUartSendDone(); if (rval != (int)buf_length) { return OT_ERROR_FAILED; } - - otPlatUartSendDone(); - return OT_ERROR_NONE; } #endif