title: Bad file descriptor closing Boost socket
body: <p>I'm using Boost 1.45 ASIO to handle some socket connections in an application that runs on both Windows and Mac.  On Windows, the following code does not cause any errors, and my sockets are closed cleanly.  On Mac though, both the shutdown and (if I comment it out) the close functions give me "Bad file descriptor" errors.  Up until I call this code, the sockets work fine.  But as soon as I call shutdown or close, I get the error.  Any ideas what could be going on?</p>
  
  <pre><code>if(socket.is_open())
  {
      socket.shutdown(socket.both);
      socket.close();
  }
  </code></pre>