Updated closed_connection to store the event correctly.