FR 494 then FR 313 at Dublin
Madrid → Dublin → Stockholm
Timetable, Dublin time
09:35FR 494 from Madrid at the gate
06:55FR 313 to Stockholm leaves the gate
21 h 20 apart on the timetable, overnight
FR 313 leaves 21 h 20 after FR 494 arrives on the timetable: more than half a day, so not a connection we count.