mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Protect 'disconnect' from a dead weak pointer.
This commit is contained in:
@@ -138,9 +138,11 @@ public:
|
||||
void disconnect ()
|
||||
{
|
||||
connection_ptr ptr = m_connection.lock ();
|
||||
m_io_service.dispatch (ptr->get_strand ().wrap (boost::bind (
|
||||
&WSConnectionType <endpoint_type>::handle_disconnect,
|
||||
m_connection)));
|
||||
|
||||
if (ptr)
|
||||
m_io_service.dispatch (ptr->get_strand ().wrap (boost::bind (
|
||||
&WSConnectionType <endpoint_type>::handle_disconnect,
|
||||
m_connection)));
|
||||
}
|
||||
|
||||
static void handle_disconnect(weak_connection_ptr c)
|
||||
|
||||
Reference in New Issue
Block a user