client calling wcf service asynchronously. Closing connection causing synchronous behaviour
<p>I'm calling a WCF service asynchronously from a client.</p>

<pre><code>int i = 0;
Service1Client client = (Service1Client)_container.Resolve&lt;IService1&gt;(new ParameterOverride("remoteAddress", url),
                new ParameterOverride("endpointConfigurationName", "basicEndpoint"));

        try
        {
            client.Open();
            foreach (var fileInstance in list)
            {
                i++;
                _logger.Debug(() =&gt; string.Format("Call {0} for url {1} for fileId: {2}", i, url, fileInstance.FileId));

                var request = new ContextRequest
                {
                    FileDetails = new FileDetails
                    {
                        FileName = fileInstance.Filename,
                        FileId = fileInstance.FileId
                    }
                };
                var contextRequest = new Context { Request = request};

                client.ValidateAsync(contextRequest).ContinueWith(AsyncMethodException, contextRequest, TaskContinuationOptions.OnlyOnFaulted);
            }
        }
        finally
        {
            if (client.State != System.ServiceModel.CommunicationState.Faulted)
            {
                _logger.Debug("Closing client");
                //client.ChannelFactory.Close();
                client.Close();
            }
            else
            {
                _logger.Debug("Aborting client");
                client.Abort();
            }
        }

        _logger.Debug("All file instances completed: {0}", list.Count);
    }
</code></pre>

<p>From the logs I can see that the client is called asynchronously.. However it appears to wait until client is closed (the wcf service completes processing the 10</p>

<pre><code>2016-11-03 16:43:39.4641 DEBUG Call 1 for url http://x/y.svc for fileId: 24
2016-11-03 16:43:39.4641 DEBUG Call 3 for url http://x/y.svc  for fileId: 26
2016-11-03 16:43:39.4641 DEBUG Call 2 for url http://x/y.svc  for fileId: 25
2016-11-03 16:43:39.4761 DEBUG Call 4 for url http://x/y.svc  for fileId: 27
2016-11-03 16:43:39.4761 DEBUG Call 5 for url http://x/y.svc  for fileId: 28
2016-11-03 16:43:39.4761 DEBUG Call 6 for url http://x/y.svc  for fileId: 29
2016-11-03 16:43:39.4761 DEBUG Call 7 for url http://x/y.svc  for fileId: 30
2016-11-03 16:43:39.4761 DEBUG Call 8 for url http://x/y.svc  for fileId: 31
2016-11-03 16:43:39.4961 DEBUG Call 9 for url http://x/y.svc  for fileId: 32
2016-11-03 16:43:39.4961 DEBUG Call 10 for url http://x/y.svc  for fileId: 33
2016-11-03 16:43:39.4961 DEBUG Closing client
2016-11-03 16:44:26.6591 DEBUG All file instances completed: 10
</code></pre>

<p>Any thoughts on how to ensure that I can close the connection on completion of service but without the wait? Is there a callback I can listen for?</p>