Fix crash when removing a connected transport interface

This commit is contained in:
Michael Zanetti 2020-01-22 23:43:07 +01:00
parent 6cdcd47f9b
commit 07cf9e05ae

View File

@ -452,6 +452,10 @@ void JsonRPCServerImplementation::unregisterTransportInterface(TransportInterfac
disconnect(interface, &TransportInterface::clientConnected, this, &JsonRPCServerImplementation::clientConnected);
disconnect(interface, &TransportInterface::clientDisconnected, this, &JsonRPCServerImplementation::clientDisconnected);
disconnect(interface, &TransportInterface::dataAvailable, this, &JsonRPCServerImplementation::processData);
foreach (const QUuid &clientId, m_clientTransports.keys(interface)) {
interface->terminateClientConnection(clientId);
clientDisconnected(clientId);
}
m_interfaces.take(interface);
}