protected override void OnClosed(EventArgs e) { base.OnClosed(e); //Closing the client gracefully closes the connection and cleans up resources client.Close(); }
protected override void OnClosed(EventArgs e) { base.OnClosed(e); // Clean up proxy when Window closes client.Close(); }