title: boost::beast ws_.async_handshake breaks when synchorneous function works
body: <p>I've built an app that connects to bitmex through boost::beast. 
  The synchronous call works fine using the code provided at:</p>
  
  <p><a href="https://www.boost.org/doc/libs/develop/libs/beast/example/websocket/client/sync-ssl/websocket_client_sync_ssl.cpp" rel="nofollow noreferrer">https://www.boost.org/doc/libs/develop/libs/beast/example/websocket/client/sync-ssl/websocket_client_sync_ssl.cpp</a></p>
  
  <p>however the code that does the same thing asynchronously at:
  <a href="https://www.boost.org/doc/libs/master/libs/beast/example/websocket/client/async-ssl/websocket_client_async_ssl.cpp" rel="nofollow noreferrer">https://www.boost.org/doc/libs/master/libs/beast/example/websocket/client/async-ssl/websocket_client_async_ssl.cpp</a></p>
  
  <p>always breaks (cores) exactly when the websocket handshake is performed:</p>
  
  <pre><code>on_ssl_handshake(boost::system::error_code ec)
  {
      if(ec)
         return ;//fail(ec, "ssl_handshake");
  
      // Perform the websocket handshake
      **ws_.async_handshake(host_, "/realtime",
          std::bind(
              &amp;session::on_handshake,
              shared_from_this(),
              std::placeholders::_1));**
  }
  </code></pre>
  
  <p>The /realtime is the target that the data should be coming from on the server side.</p>