AA 5477 then AA 3974 at O'Hare
Madison → Chicago → Harrisburg
Timetable, Chicago time
08:50AA 5477 from Madison at the gate
08:27AA 3974 to Harrisburg leaves the gate
23 h 37 apart on the timetable, overnight
AA 3974 leaves 23 h 37 after AA 5477 arrives on the timetable: more than half a day, so not a connection we count.