update status when the connection closes