Tags: mavlink/MAVSDK
Tags
camera_server: prevent double ack+message (#2430) It turns out we were sending the ack and message for storage information as well as capture status twice, once directly in the request handler callback, and once the MAVSDK user would call the respond function. We should only call it in the respond function, not in the callback.
core: prevent invalid duplicate acks (#2424) It turns out we respond with two acks to a MAV_REQUEST_MESSAGE when we should only respond once with the successful one. Alternatively, we could first grab all the results and then do some magic to determine which one is the best ack but that's a bit too magic and complex, so I'm not doing that yet.
core: prevent lockup on connection destruction (#2412) When we destroy Mavsdk and clear the list of connections, we likely end up in a deadlock. What happens is that: 1. A connection wants to forward a message and is trying to acquire the connection mutex. 2. At the same time, the connection is being destroyed, so we are waiting for the connection receive thread to be joinable. While the connections are being destroyed, we have the connection mutex which is blocking 1. The proposed solution is to: 1. Make it less likely by acquiring the connection mutex properly before checking _connections.size() and not for the individual connections. 2. Check the _should_exit flag before trying to acquire the mutex. I believe by the time the connections are being cleared, this flag is set, and hence the deadlock should not happen, fingers crossed.
PreviousNext