diff options
author | Mauro Sardara <msardara@cisco.com> | 2019-01-29 15:49:15 +0100 |
---|---|---|
committer | Michele Papalini <micpapal@cisco.com> | 2019-01-29 17:30:27 +0000 |
commit | 51ff9b669dff18c9300b9fe5bdef91e7040edac0 (patch) | |
tree | 286625282289580594c0ecf7dcf3df47a7ed8a18 /libtransport/src/hicn/transport/interfaces/socket_producer.cc | |
parent | a2e898eae8086cded2acfa96347184b3aa88d316 (diff) |
[HICN-17] Add possibility to destroy connection directly from stopEventsLoop with an additional parameter.
Change-Id: I869a079a7b2f436768a62de66fd9281a7d1243cd
Signed-off-by: Mauro Sardara <msardara@cisco.com>
Diffstat (limited to 'libtransport/src/hicn/transport/interfaces/socket_producer.cc')
-rwxr-xr-x | libtransport/src/hicn/transport/interfaces/socket_producer.cc | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/libtransport/src/hicn/transport/interfaces/socket_producer.cc b/libtransport/src/hicn/transport/interfaces/socket_producer.cc index 69adc2b3f..d9204f111 100755 --- a/libtransport/src/hicn/transport/interfaces/socket_producer.cc +++ b/libtransport/src/hicn/transport/interfaces/socket_producer.cc @@ -54,9 +54,9 @@ ProducerSocket::ProducerSocket(asio::io_service &io_service) } ProducerSocket::~ProducerSocket() { - TRANSPORT_LOGI("Destroying the ProducerSocket"); + processing_thread_stop_ = true; - portal_->stopEventsLoop(); + portal_->stopEventsLoop(true); if (processing_thread_.joinable()) { processing_thread_.join(); @@ -79,8 +79,6 @@ void ProducerSocket::serveForever() { } void ProducerSocket::stop() { - TRANSPORT_LOGI("Calling stop for ProducerSocket"); - portal_->killConnection(); portal_->stopEventsLoop(); } |