diff --git a/src/DMAPI/tgs/v5/_defines.dm b/src/DMAPI/tgs/v5/_defines.dm index a3f949081f..2f08cddd35 100644 --- a/src/DMAPI/tgs/v5/_defines.dm +++ b/src/DMAPI/tgs/v5/_defines.dm @@ -5,8 +5,8 @@ #define DMAPI5_TOPIC_DATA "tgs_data" #define DMAPI5_BRIDGE_REQUEST_LIMIT 8198 -#define DMAPI5_TOPIC_REQUEST_LIMIT 65529 -#define DMAPI5_TOPIC_RESPONSE_LIMIT 65528 +#define DMAPI5_TOPIC_REQUEST_LIMIT 65528 +#define DMAPI5_TOPIC_RESPONSE_LIMIT 65529 #define DMAPI5_BRIDGE_COMMAND_PORT_UPDATE 0 #define DMAPI5_BRIDGE_COMMAND_STARTUP 1 diff --git a/src/Tgstation.Server.Host/Components/Interop/DMApiConstants.cs b/src/Tgstation.Server.Host/Components/Interop/DMApiConstants.cs index 3a2c6fe9fb..9cca307361 100644 --- a/src/Tgstation.Server.Host/Components/Interop/DMApiConstants.cs +++ b/src/Tgstation.Server.Host/Components/Interop/DMApiConstants.cs @@ -42,12 +42,12 @@ namespace Tgstation.Server.Host.Components.Interop /// /// The maximum length in bytes of a payload. /// - public const uint MaximumTopicRequestLength = 65529; + public const uint MaximumTopicRequestLength = 65528; /// /// The maximum length in bytes of a response. /// - public const uint MaximumTopicResponseLength = 65528; + public const uint MaximumTopicResponseLength = 65529; /// /// The DMAPI being used. diff --git a/src/Tgstation.Server.Host/Tgstation.Server.Host.csproj b/src/Tgstation.Server.Host/Tgstation.Server.Host.csproj index cf25b7210b..6aa45b0e12 100644 --- a/src/Tgstation.Server.Host/Tgstation.Server.Host.csproj +++ b/src/Tgstation.Server.Host/Tgstation.Server.Host.csproj @@ -68,7 +68,7 @@ - + @@ -94,8 +94,6 @@ - - diff --git a/tests/DMAPI/LongRunning/Test.dm b/tests/DMAPI/LongRunning/Test.dm index de5cd5831d..b81b7f3f42 100644 --- a/tests/DMAPI/LongRunning/Test.dm +++ b/tests/DMAPI/LongRunning/Test.dm @@ -207,7 +207,7 @@ var/run_bridge_test /datum/tgs_chat_command/response_overload_test/Run(datum/tgs_chat_user/sender, params) // DMAPI5_TOPIC_RESPONSE_LIMIT - var/limit = 65528 + var/limit = 65529 // this actually gets doubled because it's in two fields for backwards compatibility, but that's fine var/datum/tgs_message_content/response = new(create_payload(limit * 3)) return response diff --git a/tests/Tgstation.Server.Tests/Live/Instance/WatchdogTest.cs b/tests/Tgstation.Server.Tests/Live/Instance/WatchdogTest.cs index 1621b8fe7f..d560bcc9bf 100644 --- a/tests/Tgstation.Server.Tests/Live/Instance/WatchdogTest.cs +++ b/tests/Tgstation.Server.Tests/Live/Instance/WatchdogTest.cs @@ -550,7 +550,7 @@ namespace Tgstation.Server.Tests.Live.Instance try { System.Console.WriteLine($"Topic send limit test S:{currentSize}..."); - topicRequestResult = await TopicClientNoLogger.SendTopic( + topicRequestResult = await TopicClient.SendTopic( IPAddress.Loopback, $"tgs_integration_test_tactics3={TopicClient.SanitizeString(JsonConvert.SerializeObject(topic, DMApiConstants.SerializerSettings))}", TestLiveServer.DDPort, @@ -591,7 +591,7 @@ namespace Tgstation.Server.Tests.Live.Instance { var currentSize = baseSize + (int)Math.Pow(2, nextPow); System.Console.WriteLine($"Topic recieve limit test S:{currentSize}..."); - var topicRequestResult = await TopicClientNoLogger.SendTopic( + var topicRequestResult = await TopicClient.SendTopic( IPAddress.Loopback, $"tgs_integration_test_tactics4={TopicClient.SanitizeString(currentSize.ToString())}", TestLiveServer.DDPort, @@ -944,15 +944,7 @@ namespace Tgstation.Server.Tests.Live.Instance ReceiveTimeout = TimeSpan.FromSeconds(30), ConnectTimeout = TimeSpan.FromSeconds(30), DisconnectTimeout = TimeSpan.FromSeconds(30) - }, new Logger(LiveTestUtils.CreateLoggerFactoryForLogger(loggerFactory.CreateLogger("WatchdogTest.TopicClient"), out var mockLoggerFactory))); - - public static readonly TopicClient TopicClientNoLogger = new(new SocketParameters - { - SendTimeout = TimeSpan.FromSeconds(30), - ReceiveTimeout = TimeSpan.FromSeconds(30), - ConnectTimeout = TimeSpan.FromSeconds(30), - DisconnectTimeout = TimeSpan.FromSeconds(30) - }); + }, loggerFactory.CreateLogger("WatchdogTest.TopicClient")); public async Task TellWorldToReboot(CancellationToken cancellationToken) {