From 2ef7fff79bd8213e2ac661c2538883e8d3b6108a Mon Sep 17 00:00:00 2001 From: Nav Date: Tue, 21 Sep 2021 21:14:19 +0100 Subject: [PATCH] Fixed bug with TargetController repeatedly trying to disconnect from the debug tool and/or target after a failed disconnect --- src/TargetController/TargetController.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/TargetController/TargetController.cpp b/src/TargetController/TargetController.cpp index e3354e69..942bf455 100644 --- a/src/TargetController/TargetController.cpp +++ b/src/TargetController/TargetController.cpp @@ -135,6 +135,8 @@ void TargetController::shutdown() { this->releaseHardware(); } catch (const std::exception& exception) { + this->target.reset(); + this->debugTool.reset(); Logger::error("Failed to properly shutdown TargetController. Error: " + std::string(exception.what())); }