FR 7157 then FR 7138 at Dublin
Madrid → Dublin → Lisbon
Timetable, Dublin time
20:25FR 7157 from Madrid at the gate
17:15FR 7138 to Lisbon leaves the gate
20 h 50 apart on the timetable, overnight
FR 7138 leaves 20 h 50 after FR 7157 arrives on the timetable: more than half a day, so not a connection we count.