FR 6409 then FR 5056 at Madrid
Sofia → Madrid → Dakhla
Timetable, Madrid time
13:35FR 6409 from Sofia at the gate
11:05FR 5056 to Dakhla leaves the gate
21 h 30 apart on the timetable, overnight
FR 5056 leaves 21 h 30 after FR 6409 arrives on the timetable: more than half a day, so not a connection we count.