FR 6409 then IB 797 at Madrid
Sofia → Madrid → Vienna
Timetable, Madrid time
20:10FR 6409 from Sofia at the gate
19:55IB 797 to Vienna leaves the gate
23 h 45 apart on the timetable, overnight
IB 797 leaves 23 h 45 after FR 6409 arrives on the timetable: more than half a day, so not a connection we count.