mirror of
https://gitee.com/xiaohuolufeihua/bizhang_-obav.git
synced 2026-05-22 01:12:31 +00: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);
|
||||
}
|
||||
|
||||
if (_mavlink_ulog) {
|
||||
_mavlink_ulog->stop();
|
||||
_mavlink_ulog = nullptr;
|
||||
}
|
||||
|
||||
warnx("exiting channel %i", (int)_channel);
|
||||
|
||||
return OK;
|
||||
|
||||
Reference in New Issue
Block a user