Original: Haydn died at the end of May in 1809, shortly after an attack on Vienna by the French army under Napoleon.
Simplified: He died in 1809 while Vienna was being attacked by the French army under Napoleon.