fix(client(tspmIpcClient)): Use bare topic names for IPC client subscribe/unsubscribe to fix log subscription issues
This commit is contained in:
@@ -3,6 +3,6 @@
|
||||
*/
|
||||
export const commitinfo = {
|
||||
name: '@git.zone/tspm',
|
||||
version: '5.3.0',
|
||||
version: '5.3.1',
|
||||
description: 'a no fuzz process manager'
|
||||
}
|
||||
|
@@ -155,7 +155,9 @@ export class TspmIpcClient {
|
||||
|
||||
const id = toProcessId(processId);
|
||||
const topic = `logs.${id}`;
|
||||
await this.ipcClient.subscribe(`topic:${topic}`, handler);
|
||||
// Note: IpcClient.subscribe expects the bare topic (without the 'topic:' prefix)
|
||||
// and will register a handler for 'topic:<topic>' internally.
|
||||
await this.ipcClient.subscribe(topic, handler);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -168,7 +170,8 @@ export class TspmIpcClient {
|
||||
|
||||
const id = toProcessId(processId);
|
||||
const topic = `logs.${id}`;
|
||||
await this.ipcClient.unsubscribe(`topic:${topic}`);
|
||||
// Pass bare topic; client handles 'topic:' prefix internally
|
||||
await this.ipcClient.unsubscribe(topic);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user