title: How do I remove a CLOSE_WAIT socket connection
body: <p>I have written a small program that interacts with a server on a specific port. The program works fine, but:</p>
  
  <p>Once the program terminated unexpectedly, and ever since that socket connection is shown in <code>CLOSE_WAIT</code> state. If I try to run a program it hangs and I have to force it close, which accumulates even <em>more</em> <code>CLOSE_WAIT</code> socket connections.</p>
  
  <p>Is there a way to flush these connections?</p>