From bfd5e23d434eb80e25dfa59665a2825b43c3ef3c Mon Sep 17 00:00:00 2001 From: Matt Witherspoon <32485495+spoonincode@users.noreply.github.com> Date: Wed, 30 Jan 2019 15:02:33 -0500 Subject: [PATCH] Remove queued HTTP handler registration websocketpp's socket handlers run at ultra-high priority which means they can beat registration of HTTP endpoints because they are queued via low priority. No real reason needed to queue up registration of handlers at this point so just remove this queue --- plugins/http_plugin/http_plugin.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/plugins/http_plugin/http_plugin.cpp b/plugins/http_plugin/http_plugin.cpp index ffa6d8fb823..0cce218e86c 100644 --- a/plugins/http_plugin/http_plugin.cpp +++ b/plugins/http_plugin/http_plugin.cpp @@ -560,9 +560,7 @@ namespace eosio { void http_plugin::add_handler(const string& url, const url_handler& handler) { ilog( "add api url: ${c}", ("c",url) ); - app().post(priority::low, [=](){ - my->url_handlers.insert(std::make_pair(url,handler)); - }); + my->url_handlers.insert(std::make_pair(url,handler)); } void http_plugin::handle_exception( const char *api_name, const char *call_name, const string& body, url_response_callback cb ) {