diff options
Diffstat (limited to 'libtransport/src/core/pending_interest.h')
-rw-r--r-- | libtransport/src/core/pending_interest.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/libtransport/src/core/pending_interest.h b/libtransport/src/core/pending_interest.h index b901e7d97..f49348bac 100644 --- a/libtransport/src/core/pending_interest.h +++ b/libtransport/src/core/pending_interest.h @@ -62,7 +62,13 @@ class PendingInterest { timer_.async_wait(std::forward<Handler>(cb)); } - void cancelTimer() { timer_.cancel(); } + void cancelTimer() { + try { + timer_.cancel(); + } catch (asio::system_error &e) { + // do nothing + } + } Interest::Ptr &&getInterest() { return std::move(interest_); } |