try to fix bug

This commit is contained in:
2025-04-15 21:38:06 +08:00
parent e8ec4c2a86
commit 84699708d5
3 changed files with 71 additions and 6 deletions

View File

@@ -92,7 +92,7 @@ public class UDPServer
{
Console.WriteLine(e.ToString());
throw new ArgumentException(
$"Not currect port num: {port}",
$"Failed to set up server with this port: {port}",
nameof(port)
);
}
@@ -143,7 +143,7 @@ public class UDPServer
}
else
{
return Optional.Some((UDPData)data);
return Optional.Some((UDPData)data.DeepClone());
}
}
@@ -196,7 +196,7 @@ public class UDPServer
}
else
{
return Optional.Some((UDPData)data);
return Optional.Some((UDPData)data.DeepClone());
}
}