diff options
author | Mauro Sardara <msardara@cisco.com> | 2019-05-16 14:45:13 +0200 |
---|---|---|
committer | Mauro Sardara <msardara@cisco.com> | 2019-05-16 14:45:13 +0200 |
commit | db8d063677b42c0ec8191728e55d1d5efef80822 (patch) | |
tree | de36528c0e529b853bdef8df7fdead4b53d3eca0 | |
parent | 05d7122cccb840b2d096dc6deb32dcafc3dd04db (diff) |
[HICN-198] Fix stop api of consumer socket
Change-Id: I9629ace83a40d4b669648b85c26a7b469f207cfc
Signed-off-by: Mauro Sardara <msardara@cisco.com>
-rw-r--r-- | libtransport/src/hicn/transport/interfaces/socket_consumer.cc | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/libtransport/src/hicn/transport/interfaces/socket_consumer.cc b/libtransport/src/hicn/transport/interfaces/socket_consumer.cc index af99fd60c..e1afd2161 100644 --- a/libtransport/src/hicn/transport/interfaces/socket_consumer.cc +++ b/libtransport/src/hicn/transport/interfaces/socket_consumer.cc @@ -123,12 +123,9 @@ void ConsumerSocket::asyncSendInterest(Interest::Ptr &&interest, } void ConsumerSocket::stop() { - auto &io_service = getIoService(); - io_service.dispatch([this]() { - if (transport_protocol_->isRunning()) { - transport_protocol_->stop(); - } - }); + if (transport_protocol_->isRunning()) { + transport_protocol_->stop(); + } } void ConsumerSocket::resume() { |