Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix mission gRPC server crash #668

Merged
merged 3 commits into from
Feb 14, 2019
Merged

Fix mission gRPC server crash #668

merged 3 commits into from
Feb 14, 2019

Conversation

julianoes
Copy link
Collaborator

This should fix mavlink/MAVSDK-Python#46 as well as a couple of other potential mission crashes.

If two subsequent mission progress are published at (almost) the same
time on different threads (from the thread pool) we experienced
undefined behaviour. This lock as proven to protect us from that.
This way we allow the user of the library to delete itself by doing
`mission->subscribe_progress(nullptr)`.
This caused a race condition where we wanted to inform the user that
current is now 0 and at the same time we also received an ACK/ACCEPTED
and reported -1. By removing these lines -1 we should avoid this race,
and also avoid having confusing -1 progress reports to the user.
@julianoes julianoes merged commit e354674 into develop Feb 14, 2019
@julianoes julianoes deleted the fix-mission-grpc-crash branch February 14, 2019 08:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Crash uploading mission items in gRPC
2 participants