sccn / liblsl

C++ lsl library for multi-modal time-synched data transmission over the local network
Other
107 stars 63 forks source link

inlet timestamp post processing could lead to timeout_error if using custom TimeUpdateInterval #173

Open cboulay opened 1 year ago

cboulay commented 1 year ago

Prompted by a conversation with a user in Slack (whose issue turned out to be firewall blocking UDP), I discovered that clock offset post-processing uses a default timeout of 5.0 seconds. At least I think that's what's going on here:

https://github.com/sccn/liblsl/blob/519805413a87c03d8d5ecf1882a65bbb158be2de/src/stream_inlet_impl.h#L44

If a user uses lsl_api.cfg and sets TimeUpdateInterval to >= 5.0 then there's a good chance that on the first pull the inlet will timeout while waiting for the clock offset.

https://github.com/sccn/liblsl/blob/f0487159a5de2ace0ca93773364de48f838d4153/src/time_receiver.cpp#L54-L63