Merge branch 'LYN-8025_PipeEditorServerLogsToEditor' into LYN-8514_AutomatedReviewServerLogChecks

This commit is contained in:
Gene Walters
2021-11-29 18:27:40 -08:00
2 changed files with 6 additions and 6 deletions
+2 -2
View File
@@ -127,7 +127,7 @@ public:
CryLogAlways("%s", message); CryLogAlways("%s", message);
} }
return true; // suppress default AzCore behavior. return m_suppressSystemOutput;
#else #else
AZ_UNUSED(fileName); AZ_UNUSED(fileName);
AZ_UNUSED(line); AZ_UNUSED(line);
@@ -147,7 +147,7 @@ public:
return false; // allow AZCore to do its default behavior. return false; // allow AZCore to do its default behavior.
} }
gEnv->pLog->LogError("(%s) - %s", window, message); gEnv->pLog->LogError("(%s) - %s", window, message);
return true; // suppress default AzCore behavior. return m_suppressSystemOutput;
} }
bool OnPreWarning(const char* window, const char* fileName, int line, const char* func, const char* message) override bool OnPreWarning(const char* window, const char* fileName, int line, const char* func, const char* message) override
@@ -156,6 +156,7 @@ namespace Multiplayer
[[fallthrough]]; [[fallthrough]];
case eNotify_OnEndGameMode: case eNotify_OnEndGameMode:
// Kill the configured server if it's active // Kill the configured server if it's active
AZ::TickBus::Handler::BusDisconnect();
if (m_serverProcessWatcher) if (m_serverProcessWatcher)
{ {
m_serverProcessWatcher->TerminateProcess(0); m_serverProcessWatcher->TerminateProcess(0);
@@ -168,9 +169,7 @@ namespace Multiplayer
m_serverProcessWatcher = nullptr; m_serverProcessWatcher = nullptr;
m_serverProcessTracePrinter = nullptr; m_serverProcessTracePrinter = nullptr;
} }
AZ::TickBus::Handler::BusDisconnect();
if (INetworkInterface* editorNetworkInterface = AZ::Interface<INetworking>::Get()->RetrieveNetworkInterface(AZ::Name(MpEditorInterfaceName))) if (INetworkInterface* editorNetworkInterface = AZ::Interface<INetworking>::Get()->RetrieveNetworkInterface(AZ::Name(MpEditorInterfaceName)))
{ {
editorNetworkInterface->Disconnect(m_editorConnId, AzNetworking::DisconnectReason::TerminatedByClient); editorNetworkInterface->Disconnect(m_editorConnId, AzNetworking::DisconnectReason::TerminatedByClient);
@@ -247,10 +246,12 @@ namespace Multiplayer
// Stop the previous server if one exists // Stop the previous server if one exists
if (m_serverProcessWatcher) if (m_serverProcessWatcher)
{ {
AZ::TickBus::Handler::BusDisconnect();
m_serverProcessWatcher->TerminateProcess(0); m_serverProcessWatcher->TerminateProcess(0);
} }
m_serverProcessWatcher.reset(outProcess); m_serverProcessWatcher.reset(outProcess);
m_serverProcessTracePrinter = AZStd::make_unique<ProcessCommunicatorTracePrinter>(m_serverProcessWatcher->GetCommunicator(), "EditorServer"); m_serverProcessTracePrinter = AZStd::make_unique<ProcessCommunicatorTracePrinter>(m_serverProcessWatcher->GetCommunicator(), "EditorServer");
AZ::TickBus::Handler::BusConnect();
} }
void MultiplayerEditorSystemComponent::OnGameEntitiesStarted() void MultiplayerEditorSystemComponent::OnGameEntitiesStarted()
@@ -311,7 +312,6 @@ namespace Multiplayer
// Launch the editor-server // Launch the editor-server
LaunchEditorServer(); LaunchEditorServer();
AZ::TickBus::Handler::BusConnect();
} }
else else
{ {