feat(companion): add HTTPS pairing and scoped device authority
This commit is contained in:
@@ -48,6 +48,8 @@ server.on('request', createRequestHandler({ appDirectory, server, store, provide
|
||||
async function shutdown() {
|
||||
if (closing) return; closing = true;
|
||||
clearInterval(modelImportSync);
|
||||
try { await server.workbenchCompanion?.close(); }
|
||||
catch { closing = false; console.error('Workbench shutdown rejected while companion gateway is starting.'); return; }
|
||||
try { await Promise.all([provider.abortRequests(), runtime.stopAll()]); }
|
||||
catch (cause) { closing = false; provider.resumeRequests(); console.error('Workbench shutdown remains unverified: ' + provider.redact(cause.message)); return; }
|
||||
for (const response of clients) response.end();
|
||||
|
||||
Reference in New Issue
Block a user