| 340 | } |
| 341 | |
| 342 | async stop() { |
| 343 | this.sseByChannel.clear() |
| 344 | this.ingestProducer?.dispose() |
| 345 | this.ingestProducer = undefined |
| 346 | this.webIpc?.dispose() |
| 347 | this.webIpc = null |
| 348 | this.cliSocketServer?.close() |
| 349 | this.cliSocketServer = null |
| 350 | this.workspacesIpc?.dispose() |
| 351 | this.workspacesIpc = null |
| 352 | this.workspacesWs?.dispose() |
| 353 | this.workspacesWs = null |
| 354 | if (this.workspaceService) { |
| 355 | await this.workspaceService.dispose('plugin stop') |
| 356 | this.workspaceService = null |
| 357 | if (this.workspaceServiceRef) this.workspaceServiceRef.current = null |
| 358 | } |
| 359 | this.server?.close() |
| 360 | } |
| 361 | } |