void Shutdown(string reason) { if (this.conn.Open && this.IsOpen) { conn.RemoveFromCache(this.Token); if (!sequenceFinished) { conn.Stop(this); } SetError(reason); } else { SetError(reason); } }
void Shutdown(Exception ex) { if (this.conn.Open && this.IsOpen) { conn.RemoveFromCache(this.Token); if (!sequenceFinished) { conn.Stop(this); } SetError(ex); } else { SetError(ex); } }