mavlink-router: Closed connection to TCP port crashes mavlink-router
I was trying to use pymavlink to analyze a MAVLink message. To get the message, I tried to connect to the TCP port (TcpServerPort
parameter) of mavlink-router.
But when my python script terminates, mavlink-router will stop working, because it crashed after the TCP connection was lost. As far as I understood, the TCP server should be able to even handle multiple clients, so one client disconnecting shouldn’t lead to mavlink-router terminating, right?
The verbose output looks like this (output shortened):
[...]
TCP connection [9] accepted
Accepted TCP connection on [9]
UDP [5] got 30 bytes
Endpoint [4] got message 74 to -1/-1 from 23/1
Known components:
23/1
Endpoint [6] got message 74 to -1/-1 from 23/1
Known components:
255/190
Endpoint [6] accepted message 74 to -1/-1 from 23/1
UDP [6] wrote 30 bytes
Endpoint [9] got message 74 to -1/-1 from 23/1
Known components:
Endpoint [9] accepted message 74 to -1/-1 from 23/1
TCP [9] wrote 30 bytes
[...]
UDP [4] got 13 bytes
Endpoint [5] got message 42 to -1/-1 from 23/1
Known components:
23/1
Endpoint [6] got message 42 to -1/-1 from 23/1
Known components:
255/190
Endpoint [6] accepted message 42 to -1/-1 from 23/1
UDP [6] wrote 13 bytes
Endpoint [9] got message 42 to -1/-1 from 23/1
Known components:
Endpoint [9] accepted message 42 to -1/-1 from 23/1
TCP [9] wrote 13 bytes
UDP [5] got 13 bytes
poll error for fd 9, closing it
TCP Connection [9] closed
The second part of this issue is, that the return code is zero, so the systemd unit does not re-start mavlink-router after the crash.
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 43 (14 by maintainers)
Actually i would prefer it crashing so it would restart 😃