diff --git a/plugins/network_broadcast_api/network_broadcast_api.cpp b/plugins/network_broadcast_api/network_broadcast_api.cpp index 72616c1c9f..a09728cdab 100644 --- a/plugins/network_broadcast_api/network_broadcast_api.cpp +++ b/plugins/network_broadcast_api/network_broadcast_api.cpp @@ -95,8 +95,8 @@ namespace golos { const auto n_args = args.args->size(); FC_ASSERT(n_args >= 2, "Expected at least 1 argument, got 0"); auto trx = args.args->at(1).as(); - if (n_args > 1) { - const auto max_block_age = args.args->at(1).as(); + if (n_args > 2) { + const auto max_block_age = args.args->at(2).as(); FC_ASSERT(!check_max_block_age(max_block_age)); } diff --git a/plugins/webserver/webserver_plugin.cpp b/plugins/webserver/webserver_plugin.cpp index 6d194e1470..b8a92a2c19 100644 --- a/plugins/webserver/webserver_plugin.cpp +++ b/plugins/webserver/webserver_plugin.cpp @@ -139,32 +139,28 @@ namespace golos { } if (http_endpoint && ((ws_endpoint && ws_endpoint != http_endpoint) || !ws_endpoint)) { - if (1) { - ilog("http thread is disabled in this build!"); - } else { - http_thread = std::make_shared([&]() { - ilog("start processing http thread"); - try { - http_server.clear_access_channels(websocketpp::log::alevel::all); - http_server.clear_error_channels(websocketpp::log::elevel::all); - http_server.init_asio(&http_ios); - http_server.set_reuse_addr(true); - - http_server.set_http_handler( - boost::bind(&webserver_plugin_impl::handle_http_message, this, &http_server, - _1)); - - ilog("start listening for http requests"); - http_server.listen(*http_endpoint); - http_server.start_accept(); - - http_ios.run(); - ilog("http io service exit"); - } catch (...) { - elog("error thrown from http io service"); - } - }); - } + http_thread = std::make_shared( [&]() { + ilog("start processing http thread"); + try { + http_server.clear_access_channels(websocketpp::log::alevel::all); + http_server.clear_error_channels(websocketpp::log::elevel::all); + http_server.init_asio(&http_ios); + http_server.set_reuse_addr(true); + + http_server.set_http_handler([this](connection_hdl hdl) { + this->handle_http_message(&this->http_server, hdl); + }); + + ilog("start listening for http requests"); + http_server.listen(*http_endpoint); + http_server.start_accept(); + + http_ios.run(); + ilog("http io service exit"); + } catch (...) { + elog("error thrown from http io service"); + } + }); } }