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

@@ -77,6 +77,8 @@ namespace VRCX
if (KillChildrenOnExit)
KillChildProcesses();
else
UpdateChildProcesses();
}
private void OnProcessStarted(MonitoredProcess monitoredProcess)
@@ -86,6 +88,8 @@ namespace VRCX
if (KillChildrenOnExit)
KillChildProcesses();
else
UpdateChildProcesses();
var shortcutFiles = FindShortcutFiles(AppShortcutDirectory);
@@ -107,7 +111,7 @@ namespace VRCX
{
var process = pair.Value;
if (!process.HasExited)
if (!WinApi.HasProcessExited(process.Id))
{
KillProcessTree(process.Id);
//process.Kill();
@@ -137,6 +141,7 @@ namespace VRCX
}
// Gonna be honest, not gonna spin up a 32bit windows VM to make sure this works. but it should.
// Does VRCX even run on 32bit windows?
PROCESSENTRY32 procEntry = new PROCESSENTRY32();
procEntry.dwSize = (uint)Marshal.SizeOf(typeof(PROCESSENTRY32));
@@ -182,7 +187,7 @@ namespace VRCX
foreach (var pair in startedProcesses.ToList())
{
var process = pair.Value;
if (process.HasExited)
if (WinApi.HasProcessExited(process.Id))
startedProcesses.Remove(pair.Key);
}
}