alengwenus / pypck

Asynchronous LCN-PCK library written in Python
MIT License
8 stars 4 forks source link

Fix lost serial request tasks #66

Closed maximilianriemensberger closed 3 years ago

maximilianriemensberger commented 3 years ago

PchkConnectionManager overwrites the request_serials_task. Fix it by collecting all request_serials tasks and regularly awaiting those that are done in process_input. An alternative place for doing the regular cleanup work would be either the ping task or a new separate periodic cleanup task.

@alengwenus If you prefer any of the two other options, just let me know. Shouldn't be pretty simple to change it.

The included test issues a warning about a task that was not awaited without the fix.

maximilianriemensberger commented 3 years ago

@alengwenus I rework the PR according to you suggestions. Please have a look whenever you have time. Thanks a lot!