Using std/boost make_shared for creating shared pointers

Fixed boost::function nulling issue
This commit is contained in:
Dmitry Novikov
2014-10-08 15:49:13 +04:00
parent d7a7112c8b
commit f7aeeaaa30
23 changed files with 64 additions and 63 deletions

View File

@@ -33,7 +33,7 @@ std::string get_password() {
context_ptr on_tls_init(websocketpp::connection_hdl hdl) {
std::cout << "on_tls_init called with hdl: " << hdl.lock().get() << std::endl;
context_ptr ctx(new boost::asio::ssl::context(boost::asio::ssl::context::tlsv1));
context_ptr ctx = websocketpp::lib::make_shared<boost::asio::ssl::context>(boost::asio::ssl::context::tlsv1);
try {
ctx->set_options(boost::asio::ssl::context::default_workarounds |