snstac / adsbcot

Display Aircraft in TAK - ADS-B to TAK Gateway
https://adsbcot.rtfd.io
Apache License 2.0
86 stars 22 forks source link

Crash if lost connection to FTS server #27

Closed daskalovst closed 7 months ago

daskalovst commented 1 year ago

2023-05-13 09:45:39,906 pytak INFO - Complete: <Task finished name='Task-4' coro=<RXWorker.run() done, defined at /usr/local/lib/python3.9/site-packages/pytak/classes.py:173> exception=IncompleteReadError('0 bytes read on a total of undefined expected bytes')> ERROR:asyncio:Task exception was never retrieved future: <Task finished name='Task-4' coro=<RXWorker.run() done, defined at /usr/local/lib/python3.9/site-packages/pytak/classes.py:173> exception=IncompleteReadError('0 bytes read on a total of undefined expected bytes')> Traceback (most recent call last): File "/usr/local/lib/python3.9/site-packages/pytak/classes.py", line 179, in run data: bytes = await self.readcot() File "/usr/local/lib/python3.9/site-packages/pytak/classes.py", line 168, in readcot return await self.reader.readuntil("".encode("UTF-8")) File "/usr/local/lib/python3.9/asyncio/streams.py", line 629, in readuntil raise exceptions.IncompleteReadError(chunk, None) asyncio.exceptions.IncompleteReadError: 0 bytes read on a total of undefined expected bytes

ampledata commented 1 year ago

Does this /always/ happen, or just happen if the FTS connection goes down?

If its the later, that's the expected behavior. Consider running as a systemd service so it restarts if it crashes (crashing is OK!): https://adsbcot.readthedocs.io/en/latest/running.html#as-a-background-system-service

daskalovst commented 1 year ago

like i remember only when FTS connection is down.