From a7e55fb1dde22151c93156b819a4b5e07fa167f3 Mon Sep 17 00:00:00 2001 From: Jordan Dominion Date: Thu, 22 Feb 2024 19:02:08 -0500 Subject: [PATCH] Workaround for world.Export potentially hanging forever I'm going to close #1681 with this because I haven't seen that particular issue in for every and it's the most closely related. --- build/Version.props | 2 +- src/DMAPI/tgs/v5/api.dm | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/build/Version.props b/build/Version.props index c11adcf2720..79032aba9b4 100644 --- a/build/Version.props +++ b/build/Version.props @@ -9,7 +9,7 @@ 7.0.0 13.2.0 15.2.0 - 7.1.0 + 7.1.1 5.9.0 1.4.1 1.2.1 diff --git a/src/DMAPI/tgs/v5/api.dm b/src/DMAPI/tgs/v5/api.dm index 9b64931f8f9..95b8edd3ee5 100644 --- a/src/DMAPI/tgs/v5/api.dm +++ b/src/DMAPI/tgs/v5/api.dm @@ -48,6 +48,10 @@ var/datum/tgs_version/api_version = ApiVersion() version = null // we want this to be the TGS version, not the interop version + + // sleep once to prevent an issue where world.Export on the first tick can hang indefinitely + sleep(world.tick_lag) + var/list/bridge_response = Bridge(DMAPI5_BRIDGE_COMMAND_STARTUP, list(DMAPI5_BRIDGE_PARAMETER_MINIMUM_SECURITY_LEVEL = minimum_required_security_level, DMAPI5_BRIDGE_PARAMETER_VERSION = api_version.raw_parameter, DMAPI5_PARAMETER_CUSTOM_COMMANDS = ListCustomCommands(), DMAPI5_PARAMETER_TOPIC_PORT = GetTopicPort())) if(!istype(bridge_response)) TGS_ERROR_LOG("Failed initial bridge request!")