From fabb1ec479c6d28d561a09fa6ecc8686ee4eecef Mon Sep 17 00:00:00 2001 From: AlexandraTrifan Date: Wed, 20 Mar 2024 12:52:58 +0200 Subject: [PATCH] tool_launcher: close all libm2k contexts when disconnecting the M2K. Fix the following scenario in Scopy using libm2kv0.8.0: connect, disconnect, connect again - fails due to improper libm2k context deletion. See PR #1553 for more details on this issue. Signed-off-by: AlexandraTrifan --- src/tool_launcher.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tool_launcher.cpp b/src/tool_launcher.cpp index e32d5ea9c..6a42a1ff5 100644 --- a/src/tool_launcher.cpp +++ b/src/tool_launcher.cpp @@ -1430,7 +1430,7 @@ void adiscope::ToolLauncher::destroyContext() dev->setConnected(false, false); if (m_m2k) { try { - libm2k::context::contextClose(m_m2k); + libm2k::context::contextCloseAll(); } catch (libm2k::m2k_exception &e) { HANDLE_EXCEPTION(e); qDebug() << e.what();