aboutsummaryrefslogtreecommitdiff
path: root/src/index.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/index.ts')
-rw-r--r--src/index.ts8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/index.ts b/src/index.ts
index f5c7676..ee59f10 100644
--- a/src/index.ts
+++ b/src/index.ts
@@ -115,7 +115,13 @@ export default function browserHarnessExtension(pi: ExtensionAPI): void {
pi.on("session_shutdown", async () => {
persistState(pi, state);
if (client) {
- try { await client.stop(); } catch { /* best-effort */ }
+ try {
+ await client.stop();
+ } catch (e) {
+ // Shutdown is best-effort, but a stuck stop() points at a transport
+ // bug worth surfacing for debugging.
+ console.warn("[pi-browser-harness] client.stop() failed during shutdown:", e);
+ }
client = null;
}
toolsRegistered = false;