Make Interchange support LWC correctly

#rb richard.talbotwatkin
#jira none
#rnx

#ROBOMERGE-SOURCE: CL 17287610 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v861-17282326)

[CL 17287629 by alexis matte in ue5-release-engine-test branch]
This commit is contained in:
alexis matte
2021-08-24 11:22:19 -04:00
parent 72dbd9028f
commit 6f8d411898
9 changed files with 127 additions and 15 deletions

View File

@@ -30,7 +30,7 @@ FInterchangeWorkerImpl::FInterchangeWorkerImpl(int32 InServerPID, int32 InServer
}
}
bool FInterchangeWorkerImpl::Run()
bool FInterchangeWorkerImpl::Run(const FString& WorkerVersionError)
{
UE_LOG(LogInterchangeWorker, Verbose, TEXT("connect to %d..."), ServerPort);
bool bConnected = NetworkInterface.Connect(TEXT("Interchange Worker"), ServerPort, Config::ConnectTimeout_s);
@@ -45,6 +45,29 @@ bool FInterchangeWorkerImpl::Run()
return false;
}
const bool bVersionError = !WorkerVersionError.IsEmpty();
if (bVersionError)
{
FErrorCommand ErrorCmd;
ErrorCmd.ErrorMessage = WorkerVersionError;
CommandIO.SendCommand(ErrorCmd, Config::SendCommandTimeout_s);
//We want to time out after maximum of 5 seconds
double TimeOut = 5.0;
while (TimeOut > 0)
{
if (TSharedPtr<ICommand> Command = CommandIO.GetNextCommand(0.02))
{
if(Command->GetType() == ECommandId::Terminate)
{
UE_LOG(LogInterchangeWorker, Verbose, TEXT("Terminate command received. Exiting."));
break;
}
}
TimeOut -= 0.02;
}
return false;
}
InitiatePing();
bool bIsRunning = true;