title: What would cause connections to hang in the close_wait state
body: <p>On a CentOS 7 system, C++ application is having connections hang up in the close_wait state and the daemon stops responding to network traffic. My understanding is that the Kernel handles the TCP stack management and is responsible for reaping these connections.</p>
  
  <p>What could cause these connections to get hung up and what types of bugs should I be looking for in this software? For example, <a href="https://stackoverflow.com/questions/16124958/tcp-close-wait-state-of-connections-unknown-cause">might the application be failing to shut down the socket, or might something else be going on?</a></p>