fix(loader-server): the loader keeps running when the editor IPC channel disconnects

オープン 初心者向け
#138 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
85/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
bun, typescript

調査の方向性

apps/server/src/server.ts の57~61行目にあるエディター IPC の設定を読み、apps/server/src/worker.ts の18~19行目にある切断処理と比較してください。エディター IPC モードでは、エディターチャネルの切断を処理し、子プロセスを停止して loader を終了してください。エディター切断後に loader と worker の両方が停止し、game server がポートを解放すれば完了です。

索引モデルが issue の本文から書いたものです。

説明

app:server bug
Which app is this bug report for?

server

Issue description

With --editor-ipc, the worker exits when its parent (the loader) disconnects (worker.ts#L18-L19). The loader itself has no process.on("disconnect") handler (server.ts#L57-L61).

If the editor crashes or is killed, the loader keeps running: its open IPC channel to the child keeps the event loop alive, and the game server stays up and keeps its ports. The next editor run then fails to start the game.

Found by reading the code path (not reproduced).

Expected: the loader and its worker stop when the editor goes away.

Suggested fix: in editor-IPC mode, on process.on("disconnect"), kill the child and exit.

Found during a read-only audit of main @ 044c766 (2026-11-11).

Code sample
if (editorIpc) {
  process.on("message", (message) => {
    if (child && child.exitCode === null) child.send(message as object);
  });
} // no "disconnect" handler in the loader process
Versions
  • @nanoforge-dev/loader-client / @nanoforge-dev/loader-server / @nanoforge-dev/loader-website 1.7.0 (main @ 044c766)
  • Bun 1.3.14
  • Linux x86_64
Issue priority

Medium (should be fixed soon)

I have tested this issue on a development release

044c766

主要言語
TypeScript
スター
1
フォーク
0
平均マージ
17時間 25分
マージ済み PR(30日)
11

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

NanoForge-dev/Loader のほかの issue

NanoForge-dev/Loader の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。