title: Close RabbitMQ connection even if application does not end gracefully
body: <p>I use RabbitMQ.Client (runtime version v2.0.50727, version 2.8.1.0) with C# .NET application.</p>
  
  <p>I create connection like this:</p>
  
  <pre><code>using (IConnection connection = _factory.CreateConnection())
  {
      using (IModel channel = connection.CreateModel())
      {
          // code...
      }
  }
  </code></pre>
  
  <p>If I close the application properly, it simply closes the channel and connection. But if application is closed incorrectly (e.g. pressing restart button on PC), it is not. I would like to ensure that all unnecessary connections (from previous sessions or even other applications, if by mistake other instance of the application is running somewhere else) are closed before I start my application.</p>
  
  <p>I know I may use heart beats but it is possible that my application requires really much time to start doing anything (many hours of opened connection and not being used). So I think heartbeat is not the best thing.</p>
  
  <p>How can I close all opened connections for RMQ? (Or, even better, all opened connections, with the exception for one given IP)?</p>
  
  <p>Regards!</p>