Hi

I found the problem on my own


        {
            std::cerr << "Running start" << std::endl;
            socket_.async_handshake(boost::asio::ssl::stream_base::server,
                                    boost::bind(&sync_connection<Tag,Handler>::handle_handshake, this,
                                                boost::asio::placeholders::error));
        }

As shared pointers is used I must used shared_from_this instead of using this directly