Skip to content

Commit

Permalink
Workaround for world.Export potentially hanging forever
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Cyberboss committed Feb 23, 2024
1 parent a031710 commit a7e55fb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion build/Version.props
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<TgsCommonLibraryVersion>7.0.0</TgsCommonLibraryVersion>
<TgsApiLibraryVersion>13.2.0</TgsApiLibraryVersion>
<TgsClientVersion>15.2.0</TgsClientVersion>
<TgsDmapiVersion>7.1.0</TgsDmapiVersion>
<TgsDmapiVersion>7.1.1</TgsDmapiVersion>
<TgsInteropVersion>5.9.0</TgsInteropVersion>
<TgsHostWatchdogVersion>1.4.1</TgsHostWatchdogVersion>
<TgsContainerScriptVersion>1.2.1</TgsContainerScriptVersion>
Expand Down
4 changes: 4 additions & 0 deletions src/DMAPI/tgs/v5/api.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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!")
Expand Down

0 comments on commit a7e55fb

Please sign in to comment.