You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When the time is changed to past (we changed time to 2 years ago), the event thread is freezed on xevent_thread - ddsrt_cond_waitfor. Because of this, the discovery is disconnected due to the participant lease duration after changing time to past.
Below is my temporary solution to fix it.
The ddsrt_cond_waitfor function is not implemented as monotonic on src/ddsrt/src/sync/posix/sync.c, it just calculates dds_time() + reltime and calls ddsrt_cond_waituntil.
The monotonic ddsrt_cond_waitfor can be implemented like below. (However, this is only implemented using pthread, and if you want to be compatible with other code, you should use other code. Like adding ddsrt_cond_init with is_monotonic parameter or ddsrt_cond_init_w_monotonic and so on.)
When the time is changed to past (we changed time to 2 years ago), the event thread is freezed on
xevent_thread
-ddsrt_cond_waitfor
. Because of this, the discovery is disconnected due to the participant lease duration after changing time to past.Below is my temporary solution to fix it.
The
ddsrt_cond_waitfor
function is not implemented as monotonic on src/ddsrt/src/sync/posix/sync.c, it just calculatesdds_time() + reltime
and callsddsrt_cond_waituntil
.The monotonic
ddsrt_cond_waitfor
can be implemented like below. (However, this is only implemented using pthread, and if you want to be compatible with other code, you should use other code. Like addingddsrt_cond_init
with is_monotonic parameter orddsrt_cond_init_w_monotonic
and so on.)The text was updated successfully, but these errors were encountered: