mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-28 22:23:33 +08:00
mavlink: stop ulog streaming when mavlink thread exits
'mavlink stop-all' during a log streaming session previously led to a resource leak, and log streaming could only be re-started by rebooting the system.
This commit is contained in:
@@ -2356,6 +2356,11 @@ Mavlink::task_main(int argc, char *argv[])
|
|||||||
pthread_mutex_destroy(&_message_buffer_mutex);
|
pthread_mutex_destroy(&_message_buffer_mutex);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (_mavlink_ulog) {
|
||||||
|
_mavlink_ulog->stop();
|
||||||
|
_mavlink_ulog = nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
warnx("exiting channel %i", (int)_channel);
|
warnx("exiting channel %i", (int)_channel);
|
||||||
|
|
||||||
return OK;
|
return OK;
|
||||||
|
|||||||
Reference in New Issue
Block a user