FR 5357 then FR 7157 at Madrid
Krakow → Madrid → Dublin
Timetable, Madrid time
22:20FR 5357 from Krakow at the gate
18:00FR 7157 to Dublin leaves the gate
19 h 40 apart on the timetable, overnight
FR 7157 leaves 19 h 40 after FR 5357 arrives on the timetable: more than half a day, so not a connection we count.