Skip to content

Commit

Permalink
SDK should not throw if DDS devices are not ready in time
Browse files Browse the repository at this point in the history
  • Loading branch information
OhadMeir committed Nov 17, 2024
1 parent 7ac1dfa commit fec7a5d
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/dds/rsdds-device-factory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,15 @@ class rsdds_watcher_singleton
_device_watcher->on_device_added(
[this]( std::shared_ptr< realdds::dds_device > const & dev )
{
dev->wait_until_ready(); // make sure handshake is complete
_callbacks.raise( dev, true );
try
{
dev->wait_until_ready(); // make sure handshake is complete, might throw
_callbacks.raise( dev, true );
}
catch (std::runtime_error e)
{
LOG_ERROR( "Discovered DDS device failed to be ready within timeout" << e.what() );
}
} );

_device_watcher->on_device_removed( [this]( std::shared_ptr< realdds::dds_device > const & dev )
Expand Down

0 comments on commit fec7a5d

Please sign in to comment.