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;
|
||||
case "disconnect":
|
||||
ws?.close();
|
||||
break;
|
||||
send({ type: "disconnected" });
|
||||
process.exit(0);
|
||||
}
|
||||
} catch {
|
||||
send({ type: "error", message: "invalid json" });
|
||||
|
|
|
|||
Loading…
Reference in a new issue