From b79bd701400fb8bf8a845f8a24d78e82f182bb2f Mon Sep 17 00:00:00 2001 From: JellyBrick Date: Sat, 26 May 2018 17:46:51 +0900 Subject: Improve performance --- include/tgbot/net/HttpServer.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include/tgbot/net/HttpServer.h') diff --git a/include/tgbot/net/HttpServer.h b/include/tgbot/net/HttpServer.h index 164bd2b..d68599f 100644 --- a/include/tgbot/net/HttpServer.h +++ b/include/tgbot/net/HttpServer.h @@ -51,8 +51,8 @@ public: * Starts receiving new connections. */ void start() { - std::shared_ptr> socket(new boost::asio::basic_stream_socket(_acceptor->get_io_service())); - std::shared_ptr connection(new Connection(socket, _handler)); + auto socket(std::make_shared>(_acceptor->get_io_service())); + auto connection(std::make_shared(socket, _handler)); _acceptor->async_accept(*connection->socket, [this, connection]() { connection->start(); start(); -- cgit v1.2.3