diff --git a/ecal/samples/cpp/services/latency_client/src/latency_client.cpp b/ecal/samples/cpp/services/latency_client/src/latency_client.cpp index b5523f88b1..2c9a5f07d4 100644 --- a/ecal/samples/cpp/services/latency_client/src/latency_client.cpp +++ b/ecal/samples/cpp/services/latency_client/src/latency_client.cpp @@ -1,6 +1,6 @@ /* ========================= eCAL LICENSE ================================= * - * Copyright (C) 2016 - 2019 Continental Corporation + * Copyright (C) 2016 - 2024 Continental Corporation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -36,7 +36,7 @@ int main(int argc, char** argv) eCAL::CServiceClient latency_client("latency"); // waiting for service - while (!latency_client.IsConnected()) + while (eCAL::Ok() && !latency_client.IsConnected()) { std::this_thread::sleep_for(std::chrono::milliseconds(500)); std::cout << "Waiting for the service .." << std::endl; diff --git a/ecal/samples/cpp/services/math_client/src/math_client.cpp b/ecal/samples/cpp/services/math_client/src/math_client.cpp index 2a5d93bf57..e54921c4df 100644 --- a/ecal/samples/cpp/services/math_client/src/math_client.cpp +++ b/ecal/samples/cpp/services/math_client/src/math_client.cpp @@ -1,6 +1,6 @@ /* ========================= eCAL LICENSE ================================= * - * Copyright (C) 2016 - 2019 Continental Corporation + * Copyright (C) 2016 - 2024 Continental Corporation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -105,7 +105,7 @@ int main(int argc, char **argv) int inp2(0); // waiting for service - while (!math_client.IsConnected()) + while (eCAL::Ok() && !math_client.IsConnected()) { std::this_thread::sleep_for(std::chrono::milliseconds(500)); std::cout << "Waiting for the service .." << std::endl; diff --git a/ecal/samples/cpp/services/ping_client/src/ping_client.cpp b/ecal/samples/cpp/services/ping_client/src/ping_client.cpp index 75ab654eed..e2022da6cb 100644 --- a/ecal/samples/cpp/services/ping_client/src/ping_client.cpp +++ b/ecal/samples/cpp/services/ping_client/src/ping_client.cpp @@ -1,6 +1,6 @@ /* ========================= eCAL LICENSE ================================= * - * Copyright (C) 2016 - 2019 Continental Corporation + * Copyright (C) 2016 - 2024 Continental Corporation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -36,7 +36,7 @@ int main(int argc, char **argv) eCAL::protobuf::CServiceClient ping_client("ping service"); // waiting for service - while (!ping_client.IsConnected()) + while (eCAL::Ok() && !ping_client.IsConnected()) { std::this_thread::sleep_for(std::chrono::milliseconds(500)); std::cout << "Waiting for the service .." << std::endl; diff --git a/ecal/samples/cpp/services/ping_client_dyn/src/ping_client_dyn.cpp b/ecal/samples/cpp/services/ping_client_dyn/src/ping_client_dyn.cpp index c7b140ba27..68dec7a2c8 100644 --- a/ecal/samples/cpp/services/ping_client_dyn/src/ping_client_dyn.cpp +++ b/ecal/samples/cpp/services/ping_client_dyn/src/ping_client_dyn.cpp @@ -1,6 +1,6 @@ /* ========================= eCAL LICENSE ================================= * - * Copyright (C) 2016 - 2019 Continental Corporation + * Copyright (C) 2016 - 2024 Continental Corporation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -40,7 +40,7 @@ int main(int argc, char **argv) eCAL::CServiceClient ping_client(service_name); // waiting for service - while (!ping_client.IsConnected()) + while (eCAL::Ok() && !ping_client.IsConnected()) { std::this_thread::sleep_for(std::chrono::milliseconds(500)); std::cout << "Waiting for the service .." << '\n';