FR 5994 then FR 7874 at Madrid
London Stansted → Madrid → Palermo
Timetable, Madrid time
21:05FR 5994 from London Stansted at the gate
13:30FR 7874 to Palermo leaves the gate
16 h 25 apart on the timetable, overnight
FR 7874 leaves 16 h 25 after FR 5994 arrives on the timetable: more than half a day, so not a connection we count.