Skip to content

Commit

Permalink
fix writing to the 'done' event
Browse files Browse the repository at this point in the history
  • Loading branch information
maloel committed Sep 16, 2024
1 parent b9cc8ae commit 2063010
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions third-party/rsutils/src/network-adapter-watcher.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -196,9 +196,12 @@ class network_adapter_watcher_singleton
#else
if( _th.joinable() )
{
if( write( _done, &_done, sizeof( _done ) ) != sizeof( _done ) )
/* to avoid compiler warning about not using return value */;
_th.join();
uint64_t incr = 1; // must be 8-byte integer value
auto rv = write( _done, &incr, sizeof( incr ) );
if( rv != sizeof( incr ) )
LOG_WARNING( "failed to write to network adapter watcher done event: " << rv );
else
_th.join();
}
close( _socket );
close( _done );
Expand Down

0 comments on commit 2063010

Please sign in to comment.