Skip to content

Commit

Permalink
cin test
Browse files Browse the repository at this point in the history
  • Loading branch information
maloel committed Jan 2, 2025
1 parent a6f90a6 commit 5f089e5
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion tools/dds/dds-adapter/rs-dds-adapter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,13 @@ try
device_handlers_list.erase( dev );
} );

std::cin.ignore(std::numeric_limits<std::streamsize>::max(), 0);// Pend until CTRL + C is pressed
if( ! std::cin.good() )
{
std::cout << "No CIN..." << std::endl;
std::this_thread::sleep_for( std::chrono::seconds( 120 ) );
}
else
std::cin.ignore(std::numeric_limits<std::streamsize>::max(), 0);// Pend until CTRL + C is pressed

std::cout << "Shutting down rs-dds-adapter..." << std::endl;

Expand Down

0 comments on commit 5f089e5

Please sign in to comment.