summaryrefslogtreecommitdiffstats
path: root/libtransport
diff options
context:
space:
mode:
Diffstat (limited to 'libtransport')
-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 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() {