mirror of
https://github.com/tgstation/tgstation-server.git
synced 2026-08-25 05:56:58 +01:00
Remove unnecessary reallocations
This commit is contained in:
@@ -966,13 +966,14 @@ namespace Tgstation.Server.Host.Components.Session
|
||||
var firstSend = true;
|
||||
|
||||
const int PrioritySendAttempts = 5;
|
||||
var endpoint = new IPEndPoint(IPAddress.Loopback, targetPort);
|
||||
for (var i = PrioritySendAttempts - 1; i >= 0 && (priority || firstSend); --i)
|
||||
try
|
||||
{
|
||||
firstSend = false;
|
||||
if (!killedOrRebootedTask.IsCompleted)
|
||||
byondResponse = await byondTopicSender.SendTopic(
|
||||
new IPEndPoint(IPAddress.Loopback, targetPort),
|
||||
endpoint,
|
||||
queryString,
|
||||
cancellationToken);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user