FR 3008 then FR 8239 at Madrid
Milan → Madrid → Porto
Timetable, Madrid time
19:50FR 3008 from Milan at the gate
17:05FR 8239 to Porto leaves the gate
21 h 15 apart on the timetable, overnight
FR 8239 leaves 21 h 15 after FR 3008 arrives on the timetable: more than half a day, so not a connection we count.