feat: Add new request types, world param, better error handling, various fixes (#558)

* feat: Add option for worlds to get data from other worlds

* docs: Add docs to new methods

* refactor: Add more error handling for potential edge cases

* fix: Catch exception for http listener start

* fix: Maybe stop throwing js exceptions at start from process check

* fix: Stop VRCX from dying if monitored processes are elevated

* fix: If auto close is turned off, update process states properly

* refactor: Limit db key length to 255, limit /getall to 10000 entries
This commit is contained in:
Teacup
2023-06-06 09:00:42 -04:00
committed by GitHub
parent f2c7275000
commit 70249ea790
6 changed files with 245 additions and 73 deletions

View File

@@ -2,6 +2,7 @@
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Runtime.InteropServices;
using System.Timers;
namespace VRCX
@@ -72,7 +73,7 @@ namespace VRCX
if (monitoredProcess.IsRunning)
{
if (monitoredProcess.Process == null || monitoredProcess.Process.HasExited)
if (monitoredProcess.Process == null || WinApi.HasProcessExited(monitoredProcess.Process.Id))
{
monitoredProcess.ProcessExited();
ProcessExited?.Invoke(monitoredProcess);
@@ -168,7 +169,7 @@ namespace VRCX
Process = process;
ProcessName = process.ProcessName.ToLower();
if (!process.HasExited)
if (process != null && !WinApi.HasProcessExited(process.Id))
IsRunning = true;
}