Skip to content

Bug in periodic sending #425

@hardbyte

Description

@hardbyte

In #412 I inadvertently introduced a bug for (at least) the socketcan backend. The issue is that the BusABC has now got some important logic regarding tracking Tasks in the Bus instance in the send_periodic method - and the concrete class fails to implement the same logic and the parent method isn't called.

One approach to fix it is pull out wrapping the stop method into a BusABC helper function which can easily called by backends. It would be a bit to easy for a backend not to call the helper though.

An alternative would be that backends implement _send_periodic_internal similar to _recv_internal and then the top level logic is shared. The BusABC would still continue to offer a ThreadBasedCyclicSendTask for backends that don't implement their own.

I consider the interface for backends part of the external api so fixing this might mean 2.3 becomes 3.0.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions