From 858d074a30eea89b02d7362752cccf9f713d4ca6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20W=C3=B3jcik?= <3044353+fikumikudev@users.noreply.github.com> Date: Sat, 9 Jul 2022 14:12:18 +0200 Subject: [PATCH] Fix `server_socket` close override (#3853) --- nano/node/socket.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nano/node/socket.hpp b/nano/node/socket.hpp index 7e5002440..6ff117344 100644 --- a/nano/node/socket.hpp +++ b/nano/node/socket.hpp @@ -64,7 +64,7 @@ public: void async_read (std::shared_ptr> const &, std::size_t, std::function); void async_write (nano::shared_const_buffer const &, std::function = {}); - void close (); + virtual void close (); boost::asio::ip::tcp::endpoint remote_endpoint () const; boost::asio::ip::tcp::endpoint local_endpoint () const; /** Returns true if the socket has timed out */ @@ -193,7 +193,7 @@ public: /**Start accepting new connections */ void start (boost::system::error_code &); /** Stop accepting new connections */ - void close (); + void close () override; /** Register callback for new connections. The callback must return true to keep accepting new connections. */ void on_connection (std::function const & new_connection, boost::system::error_code const &)>); uint16_t listening_port ()