From 88d8ff2ad497b98e67a5bc3b4b5b79a0b3fffe89 Mon Sep 17 00:00:00 2001 From: "irons.du" Date: Mon, 28 Mar 2022 21:04:00 +0800 Subject: [PATCH] set the `ITcpService` interface's destroy function is virtual. --- include/brynet/base/Timer.hpp | 2 +- include/brynet/net/TcpService.hpp | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/include/brynet/base/Timer.hpp b/include/brynet/base/Timer.hpp index a11ab61..b12c99d 100644 --- a/include/brynet/base/Timer.hpp +++ b/include/brynet/base/Timer.hpp @@ -76,7 +76,7 @@ class Timer final friend class TimerMgr; }; -class RepeatTimer +class RepeatTimer final { public: using Ptr = std::shared_ptr; diff --git a/include/brynet/net/TcpService.hpp b/include/brynet/net/TcpService.hpp index fdfd3cc..83d3a35 100644 --- a/include/brynet/net/TcpService.hpp +++ b/include/brynet/net/TcpService.hpp @@ -12,6 +12,7 @@ class ITcpService using Ptr = std::shared_ptr; public: + virtual ~ITcpService() = default; virtual bool addTcpConnection(TcpSocket::Ptr socket, ConnectionOption options) = 0; };