Skip to content

Commit

Permalink
shutdown condition fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
rex-schilasky committed Jun 27, 2024
1 parent 35c1fd9 commit 1c0e655
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions ecal/samples/cpp/services/math_client/src/math_client.cpp
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions ecal/samples/cpp/services/ping_client/src/ping_client.cpp
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -36,7 +36,7 @@ int main(int argc, char **argv)
eCAL::protobuf::CServiceClient<PingService> 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;
Expand Down
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -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';
Expand Down

0 comments on commit 1c0e655

Please sign in to comment.