Commit fd5a7a1b authored by Sébastien Blin's avatar Sébastien Blin Committed by Adrien Béraud

data_transfer: emit in main thread

Some clients can try to get the data info in the DataTransferEvent's callback
this can provide a deadlock on infoMutex_. To prevent that, emitting the signal
on the main thread is necessary.

Change-Id: Ifca032e497272c3da9e2a866a23e4883a142d1e9
parent 6226bca1
......@@ -127,7 +127,9 @@ DataTransfer::emit(DRing::DataTransferEventCode code) const
}
if (internalCompletionCb_)
return; // VCard transfer is just for the daemon
emitSignal<DRing::DataTransferSignal::DataTransferEvent>(id, uint32_t(code));
runOnMainThread([id = id, code]() {
emitSignal<DRing::DataTransferSignal::DataTransferEvent>(id, uint32_t(code));
});
}
//==============================================================================
......
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