Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

http_plugin shutdown - 1.8 #8509

Merged
merged 1 commit into from
Jan 27, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions plugins/http_plugin/http_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -661,6 +661,8 @@ namespace eosio {
if( my->thread_pool ) {
my->thread_pool->stop();
}

app().post( 0, [me = my](){} ); // keep my pointer alive until queue is drained
}

void http_plugin::add_handler(const string& url, const url_handler& handler) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ namespace eosio {
get_supported_apis_result get_supported_apis()const;

private:
std::unique_ptr<class http_plugin_impl> my;
std::shared_ptr<class http_plugin_impl> my;
};

/**
Expand Down