Fix racing busy signals when connecting to remote servers

This commit is contained in:
baldurk
2020-05-15 00:57:38 +01:00
parent 1d579dfb66
commit 08cf66abce
8 changed files with 196 additions and 155 deletions
+6 -8
View File
@@ -125,15 +125,13 @@ void RemoteHost::CheckStatus()
return;
}
// to avoid doing complex work while holding the remote host lock, we check the status here then
// call into the internal function that will propagate that data to the proper storage if needed.
IRemoteServer *rend = NULL;
ReplayStatus status = RENDERDOC_CreateRemoteServerConnection(m_hostname.c_str(), &rend);
UpdateStatus(RENDERDOC_CheckRemoteServerConnection(m_hostname.c_str()));
}
if(rend)
rend->ShutdownConnection();
UpdateStatus(status);
ReplayStatus RemoteHost::Connect(IRemoteServer **server)
{
QMutexLocker autolock(&m_data->mutex);
return RENDERDOC_CreateRemoteServerConnection(m_hostname.c_str(), server);
}
void RemoteHost::SetConnected(bool connected)
+8
View File
@@ -93,6 +93,14 @@ public:
)");
void SetLastCapturePath(const rdcstr &path);
DOCUMENT(R"(Create a connection to the remote server.
:return: The status of opening the capture, whether success or failure, and a :class:`RemoteServer`
instance if it were successful
:rtype: ``pair`` of ReplayStatus and RemoteServer
)");
ReplayStatus Connect(IRemoteServer **server);
DOCUMENT(
"The :class:`DeviceProtocolController` for this host, or ``None`` if no protocol is in use");
IDeviceProtocolController *Protocol() const { return m_protocol; }