Commit 1ec32f93 authored by Don Gagne's avatar Don Gagne

Fix stale signal problem

parent d5e2f29c
......@@ -223,6 +223,13 @@ void MAVLinkProtocol::_linkStatusChanged(LinkInterface* link, bool connected)
**/
void MAVLinkProtocol::receiveBytes(LinkInterface* link, QByteArray b)
{
// Since receiveBytes signals cross threads we can end up with signals in the queue
// that come through after the link is disconnected. For these we just drop the data
// since the link is closed.
if (!LinkManager::instance()->containsLink(link)) {
return;
}
// receiveMutex.lock();
mavlink_message_t message;
mavlink_status_t status;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment