diff options
author | Mauro Sardara <msardara@cisco.com> | 2020-11-20 20:21:06 +0000 |
---|---|---|
committer | Mauro Sardara <msardara@cisco.com> | 2020-11-20 20:39:33 +0000 |
commit | 9f0080e53da7ad68f501ac28b1ff26da8b95ed75 (patch) | |
tree | 1970ce6ed28c8af730bc6965353640bdd69a281c /utils | |
parent | ed312e8539807824dbff9e0ba06eb4a5d574eb15 (diff) |
[HICN-658] Improve memif connector.
Signed-off-by: Mauro Sardara <msardara@cisco.com>
Change-Id: Ie3b48148dcb3f782a1ca906a5ba59d605f17f93e
Signed-off-by: Mauro Sardara <msardara@cisco.com>
Diffstat (limited to 'utils')
-rw-r--r-- | utils/src/hiperf.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/utils/src/hiperf.cc b/utils/src/hiperf.cc index 967241250..f4764e096 100644 --- a/utils/src/hiperf.cc +++ b/utils/src/hiperf.cc @@ -217,7 +217,7 @@ class HIperfClient { : configuration_(conf), total_duration_milliseconds_(0), old_bytes_value_(0), - signals_(io_service_, SIGINT), + signals_(io_service_), expected_seg_(0), lost_packets_(std::unordered_set<uint32_t>()), rtc_callback_(configuration_.rtc_ ? new RTCCallback(*this) : nullptr), @@ -514,6 +514,7 @@ class HIperfClient { int run() { std::cout << "Starting download of " << configuration_.name << std::endl; + signals_.add(SIGINT); signals_.async_wait([this](const std::error_code &, const int &) { consumer_socket_->stop(); io_service_.stop(); @@ -712,7 +713,7 @@ class HIperfServer { public: HIperfServer(ServerConfiguration &conf) : configuration_(conf), - signals_(io_service_, SIGINT), + signals_(io_service_), rtc_timer_(io_service_), unsatisfied_interests_(), content_objects_((std::uint16_t)(1 << log2_content_object_buffer_size)), @@ -1023,6 +1024,7 @@ class HIperfServer { int run() { std::cerr << "Starting to serve consumers" << std::endl; + signals_.add(SIGINT); signals_.async_wait([this](const std::error_code &, const int &) { std::cout << "STOPPING!!" << std::endl; producer_socket_->stop(); |