mirror of
https://github.com/XRPLF/rippled.git
synced 2026-04-29 15:37:57 +00:00
Merge pull request #334 from aydany/master
Avoid leak when stopping server
This commit is contained in:
@@ -104,7 +104,13 @@ public:
|
||||
endpoint_type::m_elog.write(log::elevel::rerror,
|
||||
"start_accept error: "+ec.message());
|
||||
}
|
||||
}
|
||||
|
||||
if (ec) {
|
||||
// Terminate the connection to prevent memory leaks.
|
||||
lib::error_code con_ec;
|
||||
con->terminate(con_ec);
|
||||
}
|
||||
}
|
||||
|
||||
void handle_accept(connection_ptr con, lib::error_code const & ec) {
|
||||
if (ec) {
|
||||
|
||||
Reference in New Issue
Block a user