title: When calling a WCF channel from multiple threads some threads might get stuck for a long time
body: <p>I have encountered a weird problem in one of my projects. I am creating one WCF channel and trying to consume it from multiple threads. The service I am targeting is shut down so I except to get an exception after the "Open timeout" (30 seconds in my case) at most. But what I have seen is that the first two calls to the channel are finished (with exception) really quickly. all the other calls are finished after 20 minutes (My receive timeout).</p>
  
  <p>I am using the same channel because I don't want to wait for the channel to open for each request (Can take a few seconds in case of security and high latency). I have read that a channel is thread safe so I didn't think it should be a problem.</p>
  
  <p>I am using dot net 4</p>
  
  <p>Code sample:</p>
  
  <pre><code>EndpointAddress address = new EndpointAddress("net.tcp://localhost:9000/SomeService");
  var netTcpBinding = new NetTcpBinding();
  
  var channelFactory = new ChannelFactory&lt;IService&gt;(netTcpBinding, address);
  
  IService channel = channelFactory.CreateChannel();
  
  Parallel.For(0, 10, new ParallelOptions{MaxDegreeOfParallelism = 10}, i =&gt;
  {
      try
      {
          channel.SomeOperation();
      }
      catch
      {
  
      }
  });
  </code></pre>
  
  <p>I have tried to Close/Abort/Dispose the channel in the catch block but it didn't help.</p>
  
  <p>Does anyone have any idea why this happens and how to fix it?</p>