diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 5ddd8ef08..114e727fb 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -82,6 +82,7 @@ jobs: name: ${{ matrix.ubuntu_image }} (mavsdk_server, superbuild) runs-on: ${{ matrix.ubuntu_image }} strategy: + fail-fast: false matrix: include: - ubuntu_image: ubuntu-20.04 @@ -222,6 +223,7 @@ jobs: name: ${{ matrix.container_name }} (package, non-mavsdk_server) runs-on: ${{ matrix.container_name }} strategy: + fail-fast: false matrix: container_name: [ubuntu-20.04, ubuntu-22.04, ubuntu-24.04] steps: @@ -258,6 +260,7 @@ jobs: name: linux-${{ matrix.docker_name }} runs-on: ubuntu-20.04 strategy: + fail-fast: false matrix: include: - docker_name: armv6 @@ -356,6 +359,7 @@ jobs: name: ${{ matrix.arch_name }} runs-on: ubuntu-20.04 strategy: + fail-fast: false matrix: arch_name: [linux-armv6-musl, linux-armv7l-musl, linux-arm64-musl] steps: @@ -390,6 +394,7 @@ jobs: name: ${{ matrix.name }} runs-on: ubuntu-20.04 strategy: + fail-fast: false matrix: include: - name: android-arm @@ -434,6 +439,7 @@ jobs: name: ${{ matrix.name }} runs-on: ${{ matrix.runner }} strategy: + fail-fast: false matrix: include: - name: macOS x64 @@ -509,6 +515,7 @@ jobs: name: ${{ matrix.name }} runs-on: ${{ matrix.runner }} strategy: + fail-fast: false matrix: include: - name: ios diff --git a/src/mavsdk/core/mavlink_command_sender.cpp b/src/mavsdk/core/mavlink_command_sender.cpp index 81017214a..5ed98b340 100644 --- a/src/mavsdk/core/mavlink_command_sender.cpp +++ b/src/mavsdk/core/mavlink_command_sender.cpp @@ -88,13 +88,16 @@ void MavlinkCommandSender::queue_command_async( CommandIdentification identification = identification_from_command(command); - for (const auto& work : _work_queue) { - if (work->identification == identification && callback == nullptr) { - if (_command_debugging) { - LogDebug() << "Dropping command " << static_cast(identification.command) - << " that is already being sent"; + { + LockedQueue::Guard work_queue_guard(_work_queue); + for (const auto& work : _work_queue) { + if (work->identification == identification && callback == nullptr) { + if (_command_debugging) { + LogDebug() << "Dropping command " << static_cast(identification.command) + << " that is already being sent"; + } + return; } - return; } } @@ -117,13 +120,16 @@ void MavlinkCommandSender::queue_command_async( CommandIdentification identification = identification_from_command(command); - for (const auto& work : _work_queue) { - if (work->identification == identification && callback == nullptr) { - if (_command_debugging) { - LogDebug() << "Dropping command " << static_cast(identification.command) - << " that is already being sent"; + { + LockedQueue::Guard work_queue_guard(_work_queue); + for (const auto& work : _work_queue) { + if (work->identification == identification && callback == nullptr) { + if (_command_debugging) { + LogDebug() << "Dropping command " << static_cast(identification.command) + << " that is already being sent"; + } + return; } - return; } }