Add clean exit handling to bridge process
This commit is contained in:
parent
4d6ecf78cd
commit
bbfc9998a5
1 changed files with 2 additions and 1 deletions
|
|
@ -126,7 +126,8 @@ for await (const chunk of Bun.stdin.stream()) {
|
||||||
break;
|
break;
|
||||||
case "disconnect":
|
case "disconnect":
|
||||||
ws?.close();
|
ws?.close();
|
||||||
break;
|
send({ type: "disconnected" });
|
||||||
|
process.exit(0);
|
||||||
}
|
}
|
||||||
} catch {
|
} catch {
|
||||||
send({ type: "error", message: "invalid json" });
|
send({ type: "error", message: "invalid json" });
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue