From dd4eb7ce1e9e7fca1128f5760e3a1ae4bc18cdc0 Mon Sep 17 00:00:00 2001
From: Paul Beuchat <beuchatp@control.ee.ethz.ch>
Date: Thu, 23 Sep 2021 14:23:39 +0200
Subject: [PATCH] Fixed possible bug where vicon connection variable was only
 locally defined inside of a while loop.

---
 dfall_ws/src/dfall_pkg/src/nodes/ViconDataPublisher.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dfall_ws/src/dfall_pkg/src/nodes/ViconDataPublisher.cpp b/dfall_ws/src/dfall_pkg/src/nodes/ViconDataPublisher.cpp
index 9d2a762c..4af048be 100755
--- a/dfall_ws/src/dfall_pkg/src/nodes/ViconDataPublisher.cpp
+++ b/dfall_ws/src/dfall_pkg/src/nodes/ViconDataPublisher.cpp
@@ -122,7 +122,7 @@ int main(int argc, char* argv[]) {
     while (!vicon_client.IsConnected().Connected)
     {
         // Get the connection status
-        bool vicon_connection_isok = (vicon_client.Connect(hostName).Result == Result::Success);
+        vicon_connection_isok = (vicon_client.Connect(hostName).Result == Result::Success);
 
         if (!vicon_connection_isok)
         {
-- 
GitLab