fix: add port forward timeout handling in DebugSessionRequestHandler

This commit is contained in:
Neil Dorin 2026-06-12 15:08:34 -06:00 committed by equinoy
parent 7ff4f29c11
commit ee971c4ce1
2 changed files with 73 additions and 1 deletions

View file

@ -72,6 +72,20 @@ namespace PepperDash.Core
/// </summary>
public bool IsRunning { get => _httpsServer?.IsListening ?? false; }
/// <summary>
/// Gets a value indicating whether there are active WebSocket connections.
/// </summary>
public bool HasActiveConnections
{
get
{
if (_httpsServer == null || !_httpsServer.IsListening) return false;
var service = _httpsServer.WebSocketServices[_path];
if (service == null) return false;
return service.Sessions.Count > 0;
}
}
private readonly ITextFormatter _textFormatter;
@ -217,6 +231,8 @@ namespace PepperDash.Core
{
Debug.LogInformation("Starting Websocket Server on port: {0}", port);
Start(port, CertPath, _certificatePassword);
}