bmwcarit / python-dlt

python-dlt is a thin Python ctypes wrapper around libdlt functions
Mozilla Public License 2.0
34 stars 29 forks source link

Fix endless file reading even with a set stop event #58

Closed lzhou3957 closed 1 year ago

lzhou3957 commented 1 year ago

Problem: when a dlt file always has incoming dlt messages, the file reading fails to stop even when users set the stop_reading_event. Because we dont check the status of stop_reading_event while reading dlt file returns OK, so the set stop_reading_event wont be perceived

Solution: while reading dlt file returns OK, we have another check of the status of stop_reading_event, so that the reading could be stopped accordingly