aboutsummaryrefslogtreecommitdiffstats
path: root/libtransport
diff options
context:
space:
mode:
authorAngelo Mantellini <angelo.mantellini@cisco.com>2020-06-03 14:47:16 +0000
committerGerrit Code Review <gerrit@fd.io>2020-06-03 14:47:16 +0000
commitf3f4f8cf18bf21c522e73571d183c95ef5dcb33c (patch)
tree0eb89fe5ed20ea42985f49a3f0d40f32db25ae0f /libtransport
parent8340427544b3adedd57736fb13ca69c5549b6fc1 (diff)
parent5d8156ea4c34f9a3cb986da16a71faebfb2add6b (diff)
Merge "[HICN-622] Add stop() functionality to http proxy."
Diffstat (limited to 'libtransport')
-rw-r--r--libtransport/CMakeLists.txt3
-rw-r--r--libtransport/includes/hicn/transport/utils/event_thread.h8
2 files changed, 4 insertions, 7 deletions
diff --git a/libtransport/CMakeLists.txt b/libtransport/CMakeLists.txt
index c431ace04..67492cb11 100644
--- a/libtransport/CMakeLists.txt
+++ b/libtransport/CMakeLists.txt
@@ -52,9 +52,6 @@ set(TRANSPORT_HTTP ${TRANSPORT_ROOT_PATH}/http)
set(TRANSPORT_PORTABILITY ${TRANSPORT_ROOT_PATH}/portability)
set(TRANSPORT_INTERFACES ${TRANSPORT_ROOT_PATH}/interfaces)
-# Install includes
-set(INSTALL_INCLUDE_DIR include/hicn/transport)
-
set(LIBTRANSPORT hicntransport)
if ((BUILD_HICNPLUGIN OR BUILD_MEMIF_CONNECTOR) AND "${CMAKE_SYSTEM_NAME}" STREQUAL "Linux")
set(__vpp__ 1)
diff --git a/libtransport/includes/hicn/transport/utils/event_thread.h b/libtransport/includes/hicn/transport/utils/event_thread.h
index db1194821..702c98f8d 100644
--- a/libtransport/includes/hicn/transport/utils/event_thread.h
+++ b/libtransport/includes/hicn/transport/utils/event_thread.h
@@ -34,7 +34,7 @@ class EventThread {
explicit EventThread(asio::io_service& io_service)
: internal_io_service_(nullptr),
io_service_(io_service),
- work_(io_service_),
+ work_(std::make_unique<asio::io_service::work>(io_service_)),
thread_(nullptr) {
run();
}
@@ -42,7 +42,7 @@ class EventThread {
explicit EventThread()
: internal_io_service_(std::make_unique<asio::io_service>()),
io_service_(*internal_io_service_),
- work_(io_service_),
+ work_(std::make_unique<asio::io_service::work>(io_service_)),
thread_(nullptr) {
run();
}
@@ -78,7 +78,7 @@ class EventThread {
}
void stop() {
- io_service_.stop();
+ work_.reset();
if (thread_ && thread_->joinable()) {
thread_->join();
@@ -94,7 +94,7 @@ class EventThread {
private:
std::unique_ptr<asio::io_service> internal_io_service_;
asio::io_service& io_service_;
- asio::io_service::work work_;
+ std::unique_ptr<asio::io_service::work> work_;
std::unique_ptr<std::thread> thread_;
};