Open JoelBender opened 3 months ago
Task exception was never retrieved
future: <Task finished name='Task-38353' coro=<ClientSSM.await_confirmation_timeout() done, defined at /home/ctremblay/.local/lib/python3.10/site-packages/bacpypes3/appservice.py:836> exception=RuntimeError('invalid state transition from COMPLETED to AWAIT_CONFIRMATION')>
Traceback (most recent call last):
File "/home/ctremblay/.local/lib/python3.10/site-packages/bacpypes3/appservice.py", line 852, in await_confirmation_timeout
await self.indication(self.segmentAPDU)
File "/home/ctremblay/.local/lib/python3.10/site-packages/bacpypes3/appservice.py", line 536, in indication
self.set_state(AWAIT_CONFIRMATION, self.apduTimeout)
File "/home/ctremblay/.local/lib/python3.10/site-packages/bacpypes3/appservice.py", line 404, in set_state
SSM.set_state(self, newState, timer)
File "/home/ctremblay/.local/lib/python3.10/site-packages/bacpypes3/appservice.py", line 216, in set_state
raise err
RuntimeError: invalid state transition from COMPLETED to AWAIT_CONFIRMATION
that was on Gitter but it's probably better to put that here as reference
This is running on a Raspberry Pi, Ubuntu 64bit
Every once in a while this exception is raised. Upon investigation,
indication()
is being called fromawait_confirmation_timeout()
here as if the request is coming from the application but that's not actually true. The state is COMPLETED, so that means that the response was received but the timeout task wasn't canceled. TheTask
object that returned by ensure_future() should be canceled, or better associated with the_timer_handle()
.@ChristianTremblay