feat: add HTTP GET handler to RoutingFeedbackWebSocket for client certificate confirmation

This commit is contained in:
Neil Dorin 2026-06-22 22:48:16 -06:00
parent b65f895e06
commit a1d168c4ed
2 changed files with 41 additions and 21 deletions

View file

@ -50,11 +50,11 @@ public static class Extensions
/// </summary>
private static Dictionary<string, List<TieLine>> _tieLinesBySource;
/// <summary>
/// Cache of failed route attempts to avoid re-checking impossible paths.
/// Format: "sourceKey|destKey|signalType"
/// </summary>
private static readonly HashSet<string> _impossibleRoutes = new HashSet<string>();
// /// <summary>
// /// Cache of failed route attempts to avoid re-checking impossible paths.
// /// Format: "sourceKey|destKey|signalType"
// /// </summary>
// private static readonly HashSet<string> _impossibleRoutes = new HashSet<string>();
/// <summary>
/// Indexes all TieLines by source and destination device keys for faster lookups.
@ -130,14 +130,14 @@ public static class Extensions
return string.Format("{0}|{1}|{2}", sourceKey, destKey, type);
}
/// <summary>
/// Clears the impossible routes cache. Should be called if TieLines are added/removed at runtime.
/// </summary>
public static void ClearImpossibleRoutesCache()
{
_impossibleRoutes.Clear();
Debug.LogMessage(LogEventLevel.Information, "Impossible routes cache cleared");
}
// /// <summary>
// /// Clears the impossible routes cache. Should be called if TieLines are added/removed at runtime.
// /// </summary>
// public static void ClearImpossibleRoutesCache()
// {
// _impossibleRoutes.Clear();
// Debug.LogMessage(LogEventLevel.Information, "Impossible routes cache cleared");
// }
/// <summary>
@ -549,12 +549,12 @@ public static class Extensions
{
cycle++;
var routeKey = GetRouteKey(source.Key, destination.Key, signalType);
if (_impossibleRoutes.Contains(routeKey))
{
Debug.LogMessage(LogEventLevel.Verbose, "Route {0} is cached as impossible, skipping", null, routeKey);
return false;
}
// var routeKey = GetRouteKey(source.Key, destination.Key, signalType);
// if (_impossibleRoutes.Contains(routeKey))
// {
// Debug.LogMessage(LogEventLevel.Verbose, "Route {0} is cached as impossible, skipping", null, routeKey);
// return false;
// }
Debug.LogMessage(LogEventLevel.Verbose, "GetRouteToSource: {cycle} {sourceKey}:{sourcePortKey}--> {destinationKey}:{destinationPortKey} {type}", null, cycle, source.Key, sourcePort?.Key ?? "auto", destination.Key, destinationPort?.Key ?? "auto", signalType.ToString());
@ -651,8 +651,8 @@ public static class Extensions
{
Debug.LogMessage(LogEventLevel.Verbose, "No route found to {0}", destination, source.Key);
// Cache this as an impossible route
_impossibleRoutes.Add(routeKey);
// // Cache this as an impossible route
// _impossibleRoutes.Add(routeKey);
return false;
}