FR 5994 then FR 7071 at Madrid
London Stansted → Madrid → Gdansk
Timetable, Madrid time
21:05FR 5994 from London Stansted at the gate
20:15FR 7071 to Gdansk leaves the gate
23 h 10 apart on the timetable, overnight
FR 7071 leaves 23 h 10 after FR 5994 arrives on the timetable: more than half a day, so not a connection we count.