From 0e0cbd6b17b72dea661de9e232419dd78b070bba Mon Sep 17 00:00:00 2001 From: Ant2000 Date: Wed, 18 Sep 2024 14:04:45 +0530 Subject: [PATCH] feat(modem): Delete CMUX internal implementation even if terminal exit fails --- components/esp_modem/src/esp_modem_dte.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/components/esp_modem/src/esp_modem_dte.cpp b/components/esp_modem/src/esp_modem_dte.cpp index c8dd23aee2..677708fa4e 100644 --- a/components/esp_modem/src/esp_modem_dte.cpp +++ b/components/esp_modem/src/esp_modem_dte.cpp @@ -156,12 +156,10 @@ bool DTE::exit_cmux() if (!cmux_term) { return false; } - if (!cmux_term->deinit()) { - return false; - } + const bool success = cmux_term->deinit(); exit_cmux_internal(); cmux_term.reset(); - return true; + return success; } void DTE::exit_cmux_internal()