mirror of
https://github.com/XRPLF/rippled.git
synced 2026-06-03 16:56:48 +00:00
Require a valid con before calling terminate
If get_connection returns null, e.g., if during stop the tls_init handler is removed from the server, con->terminate will cause a crash.
This commit is contained in:
@@ -105,7 +105,7 @@ public:
|
||||
"start_accept error: "+ec.message());
|
||||
}
|
||||
|
||||
if (ec) {
|
||||
if (ec && con) {
|
||||
// Terminate the connection to prevent memory leaks.
|
||||
lib::error_code con_ec;
|
||||
con->terminate(con_ec);
|
||||
|
||||
Reference in New Issue
Block a user