Fixed connection duplicate close issue, copied fix from AuditEventIterator.