diff --git a/src/DMAPI/tgs/v5/_defines.dm b/src/DMAPI/tgs/v5/_defines.dm
index c7213cc246..f973338daa 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/Components/StaticFiles/Configuration.cs b/src/Tgstation.Server.Host/Components/StaticFiles/Configuration.cs
index 55a8aba459..5e7391a6fc 100644
--- a/src/Tgstation.Server.Host/Components/StaticFiles/Configuration.cs
+++ b/src/Tgstation.Server.Host/Components/StaticFiles/Configuration.cs
@@ -227,28 +227,28 @@ namespace Tgstation.Server.Host.Components.StaticFiles
void ListImpl()
{
- var enumerator = synchronousIOManager.GetDirectories(path, cancellationToken);
try
{
+ var enumerator = synchronousIOManager.GetDirectories(path, cancellationToken);
result.AddRange(enumerator.Select(x => new ConfigurationFileResponse
{
IsDirectory = true,
Path = ioManager.ConcatPath(configurationRelativePath, x),
}).OrderBy(file => file.Path));
+
+ enumerator = synchronousIOManager.GetFiles(path, cancellationToken);
+ result.AddRange(enumerator.Select(x => new ConfigurationFileResponse
+ {
+ IsDirectory = false,
+ Path = ioManager.ConcatPath(configurationRelativePath, x),
+ }).OrderBy(file => file.Path));
}
- catch (IOException e)
+ catch (IOException ex)
{
- logger.LogDebug(e, "IOException while writing {path}!", path);
+ logger.LogDebug(ex, "IOException while enumerating direcotry!");
result = null;
return;
}
-
- enumerator = synchronousIOManager.GetFiles(path, cancellationToken);
- result.AddRange(enumerator.Select(x => new ConfigurationFileResponse
- {
- IsDirectory = false,
- Path = ioManager.ConcatPath(configurationRelativePath, x),
- }).OrderBy(file => file.Path));
}
using (await SemaphoreSlimContext.Lock(semaphore, cancellationToken))
diff --git a/src/Tgstation.Server.Host/Tgstation.Server.Host.csproj b/src/Tgstation.Server.Host/Tgstation.Server.Host.csproj
index 5ad574fe88..2d617e7e27 100644
--- a/src/Tgstation.Server.Host/Tgstation.Server.Host.csproj
+++ b/src/Tgstation.Server.Host/Tgstation.Server.Host.csproj
@@ -66,7 +66,7 @@
-
+
@@ -92,8 +92,6 @@
-
-
diff --git a/tests/DMAPI/LongRunning/Test.dm b/tests/DMAPI/LongRunning/Test.dm
index e2a8175fb3..840e994c2c 100644
--- a/tests/DMAPI/LongRunning/Test.dm
+++ b/tests/DMAPI/LongRunning/Test.dm
@@ -218,7 +218,7 @@ var/received_health_check = FALSE
/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 1aadd0f20e..0f6996988c 100644
--- a/tests/Tgstation.Server.Tests/Live/Instance/WatchdogTest.cs
+++ b/tests/Tgstation.Server.Tests/Live/Instance/WatchdogTest.cs
@@ -562,7 +562,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,
@@ -603,7 +603,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,
@@ -956,15 +956,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)
{