From db8d063677b42c0ec8191728e55d1d5efef80822 Mon Sep 17 00:00:00 2001 From: Mauro Sardara Date: Thu, 16 May 2019 14:45:13 +0200 Subject: [HICN-198] Fix stop api of consumer socket Change-Id: I9629ace83a40d4b669648b85c26a7b469f207cfc Signed-off-by: Mauro Sardara --- libtransport/src/hicn/transport/interfaces/socket_consumer.cc | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'libtransport/src/hicn/transport/interfaces/socket_consumer.cc') 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() { -- cgit 1.2.3-korg