Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[sample] shutdown condition fixed #1641

Merged
merged 1 commit into from
Jun 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading