diff options
author | Thomas Markwalder <tmark@isc.org> | 2022-12-02 21:55:17 +0100 |
---|---|---|
committer | Thomas Markwalder <tmark@isc.org> | 2022-12-02 21:55:17 +0100 |
commit | 04870e8f35047c3b907364f39ccb6c7bbb1594aa (patch) | |
tree | d7743014fb2c2bcab24ea5f9dfd18f855c61486e | |
parent | [#2621] fixed UT compilation on with clang and c++20 (diff) | |
download | kea-04870e8f35047c3b907364f39ccb6c7bbb1594aa.tar.xz kea-04870e8f35047c3b907364f39ccb6c7bbb1594aa.zip |
[#2655] Added stop() to TcpListener dtor
TcpListener destructor should call stop().
modified:
src/lib/tcp/tcp_listener.cc
src/lib/tcp/tcp_listener.h
-rw-r--r-- | src/lib/tcp/tcp_listener.cc | 5 | ||||
-rw-r--r-- | src/lib/tcp/tcp_listener.h | 3 |
2 files changed, 6 insertions, 2 deletions
diff --git a/src/lib/tcp/tcp_listener.cc b/src/lib/tcp/tcp_listener.cc index 31a6f8b2a5..c63ea18c89 100644 --- a/src/lib/tcp/tcp_listener.cc +++ b/src/lib/tcp/tcp_listener.cc @@ -45,6 +45,11 @@ TcpListener::TcpListener(IOService& io_service, } } + +TcpListener::~TcpListener() { + stop(); +} + const TCPEndpoint& TcpListener::getEndpoint() const { return (*endpoint_); diff --git a/src/lib/tcp/tcp_listener.h b/src/lib/tcp/tcp_listener.h index 20d88762ff..c06c4ece35 100644 --- a/src/lib/tcp/tcp_listener.h +++ b/src/lib/tcp/tcp_listener.h @@ -64,8 +64,7 @@ public: const TcpConnectionFilterCallback& connection_filter = 0); /// @brief Virtual destructor. - virtual ~TcpListener() { - } + virtual ~TcpListener(); /// @brief Returns reference to the current listener endpoint. const asiolink::TCPEndpoint& getEndpoint() const; |