/// <summary> /// Event handler for error. /// </summary> /// <param name="sender">Sender object.</param> /// <param name="e">The event args.</param> private void OnProtocolError(object sender, ProtocolErrorEventArgs e) { this.End(StatusCode.ProtocolError); if (this.OnError != null) { this.OnError(this, e); } }