aboutsummaryrefslogtreecommitdiffstats
path: root/libtransport/src/hicn/transport/interfaces/socket_consumer.cc
diff options
context:
space:
mode:
authorMauro Sardara <msardara@cisco.com>2019-05-16 14:45:13 +0200
committerMauro Sardara <msardara@cisco.com>2019-05-16 14:45:13 +0200
commitdb8d063677b42c0ec8191728e55d1d5efef80822 (patch)
treede36528c0e529b853bdef8df7fdead4b53d3eca0 /libtransport/src/hicn/transport/interfaces/socket_consumer.cc
parent05d7122cccb840b2d096dc6deb32dcafc3dd04db (diff)
[HICN-198] Fix stop api of consumer socket
Change-Id: I9629ace83a40d4b669648b85c26a7b469f207cfc Signed-off-by: Mauro Sardara <msardara@cisco.com>
Diffstat (limited to 'libtransport/src/hicn/transport/interfaces/socket_consumer.cc')
-rw-r--r--libtransport/src/hicn/transport/interfaces/socket_consumer.cc9
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 af99fd6..e1afd21 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() {