Skip to content

Commit

Permalink
core: fix another double promise
Browse files Browse the repository at this point in the history
The problem is that the function called when a timeout happens, always
calls the _all_params_callback which it should not. In fact, there
should be two different timeout handlers instead.
  • Loading branch information
julianoes committed May 25, 2022
1 parent 5fbd395 commit b1b0d69
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/mavsdk/core/mavlink_parameters.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -913,6 +913,7 @@ void MAVLinkParameters::process_param_value(const mavlink_message_t& message)
if (param_value.param_index + 1 == param_value.param_count) {
_parent.unregister_timeout_handler(_all_params_timeout_cookie);
_all_params_callback(_all_params);
_all_params_callback = nullptr;
} else {
_parent.unregister_timeout_handler(_all_params_timeout_cookie);

Expand Down

0 comments on commit b1b0d69

Please sign in to comment.