mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-05 17:40:39 +00:00
Don't keep fetching messages if the remote server has disconnected
This commit is contained in:
@@ -1635,18 +1635,28 @@ void MainWindow::messageCheck()
|
||||
}
|
||||
|
||||
m_Ctx.Replay().AsyncInvoke([this](IReplayController *r) {
|
||||
rdcarray<DebugMessage> msgs = r->GetDebugMessages();
|
||||
rdcarray<DebugMessage> msgs;
|
||||
|
||||
bool disconnected = false;
|
||||
|
||||
if(m_Ctx.Replay().CurrentRemote())
|
||||
{
|
||||
bool prev = m_Ctx.Replay().CurrentRemote()->serverRunning;
|
||||
bool wasRunning = m_Ctx.Replay().CurrentRemote()->serverRunning;
|
||||
|
||||
m_Ctx.Replay().PingRemote();
|
||||
|
||||
if(prev != m_Ctx.Replay().CurrentRemote()->serverRunning)
|
||||
if(wasRunning != m_Ctx.Replay().CurrentRemote()->serverRunning)
|
||||
{
|
||||
qCritical() << "Remote server disconnected";
|
||||
disconnected = true;
|
||||
}
|
||||
|
||||
if(!disconnected && wasRunning)
|
||||
msgs = r->GetDebugMessages();
|
||||
}
|
||||
else
|
||||
{
|
||||
msgs = r->GetDebugMessages();
|
||||
}
|
||||
|
||||
GUIInvoke::call(this, [this, disconnected, msgs] {
|
||||
|
||||
@@ -2519,6 +2519,7 @@ bool ReplayProxy::CheckError(ReplayProxyPacket receivedPacket, ReplayProxyPacket
|
||||
if(m_Writer.IsErrored() || m_Reader.IsErrored() || m_IsErrored)
|
||||
{
|
||||
RDCERR("Error during processing of %s", ToStr(expectedPacket).c_str());
|
||||
m_IsErrored = true;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -39,6 +39,8 @@ static std::string wsaerr_string(int err)
|
||||
{
|
||||
switch(err)
|
||||
{
|
||||
case WSAENOTSOCK:
|
||||
return "WSAENOTSOCK: An operation was attempted on something that is not a socket";
|
||||
case WSAEWOULDBLOCK:
|
||||
return "WSAEWOULDBLOCK: A non-blocking socket operation could not be completed immediately";
|
||||
case WSAEADDRINUSE:
|
||||
|
||||
Reference in New Issue
Block a user