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
{{ message }}
Repository navigation
SocketcanBus.send() timeout semantics differ from BusABC.send() #2005
In the send() method of BusABC, the optional timeout argument is documented as
If > 0, wait up to this many seconds for message to be ACK'ed or
for transmit queue to be ready depending on driver implementation.
If timeout is exceeded, an exception will be raised.
Might not be supported by all interfaces.
None blocks indefinitely.
but the SocketcanBus implementation of BusABC documents (and implements) it like this:
Wait up to this many seconds for the transmit queue to be ready.
If not given, the call may fail immediately.
It looks to me like the handling in SocketcanBus just doesn't conform to the expected interface, in particular it does
# If no timeout is given, poll for availabilityiftimeoutisNone:
timeout=0
which results in nonblocking behavior and potentially raising can.CanOperationError("Transmit buffer full") instead of waiting indefinitely when no timeout is specified.
Activity