Merge PR #252: Fix crash when removing a connected transport interface
This commit is contained in:
commit
401a42a78c
@ -458,6 +458,10 @@ void JsonRPCServerImplementation::unregisterTransportInterface(TransportInterfac
|
|||||||
disconnect(interface, &TransportInterface::clientConnected, this, &JsonRPCServerImplementation::clientConnected);
|
disconnect(interface, &TransportInterface::clientConnected, this, &JsonRPCServerImplementation::clientConnected);
|
||||||
disconnect(interface, &TransportInterface::clientDisconnected, this, &JsonRPCServerImplementation::clientDisconnected);
|
disconnect(interface, &TransportInterface::clientDisconnected, this, &JsonRPCServerImplementation::clientDisconnected);
|
||||||
disconnect(interface, &TransportInterface::dataAvailable, this, &JsonRPCServerImplementation::processData);
|
disconnect(interface, &TransportInterface::dataAvailable, this, &JsonRPCServerImplementation::processData);
|
||||||
|
foreach (const QUuid &clientId, m_clientTransports.keys(interface)) {
|
||||||
|
interface->terminateClientConnection(clientId);
|
||||||
|
clientDisconnected(clientId);
|
||||||
|
}
|
||||||
m_interfaces.take(interface);
|
m_interfaces.take(interface);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user