mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-08-31 19:08:29 +00:00
feat: add HTTP GET handler to RoutingFeedbackWebSocket for client certificate confirmation
This commit is contained in:
parent
b65f895e06
commit
a1d168c4ed
2 changed files with 41 additions and 21 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue