mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-08-31 19:08:29 +00:00
fix: add port forward timeout handling in DebugSessionRequestHandler
This commit is contained in:
parent
7ff4f29c11
commit
ee971c4ce1
2 changed files with 73 additions and 1 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue