FR 7241 then FR 1908 at Dublin
Madrid → Dublin → Gdansk
Timetable, Dublin time
11:40FR 7241 from Madrid at the gate
05:45FR 1908 to Gdansk leaves the gate
18 h 05 apart on the timetable, overnight
FR 1908 leaves 18 h 05 after FR 7241 arrives on the timetable: more than half a day, so not a connection we count.