mirror of
https://github.com/monero-project/monero.git
synced 2025-05-06 21:14:58 -04:00
abstract_tcp_server2: improve tracking/cancelling of early connections
We don't actually need to keep them past the call to start, as this adds them to the config object list, and so they'll then be cancelled already when the stop signal arrives. This allows removing the periodic call to cleanup connections.
This commit is contained in:
parent
9e6bcbc014
commit
80d361c795
2 changed files with 15 additions and 22 deletions
|
@ -281,8 +281,6 @@ namespace net_utils
|
|||
|
||||
bool is_thread_worker();
|
||||
|
||||
bool cleanup_connections();
|
||||
|
||||
/// The io_service used to perform asynchronous operations.
|
||||
std::unique_ptr<boost::asio::io_service> m_io_service_local_instance;
|
||||
boost::asio::io_service& io_service_;
|
||||
|
@ -309,7 +307,7 @@ namespace net_utils
|
|||
connection_ptr new_connection_;
|
||||
|
||||
boost::mutex connections_mutex;
|
||||
std::deque<std::pair<boost::system_time, connection_ptr>> connections_;
|
||||
std::set<connection_ptr> connections_;
|
||||
|
||||
}; // class <>boosted_tcp_server
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue