fix(loader-server): a watch restart forks the new worker before the old one exits
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 72/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- bun, node.js, typescript
- Área
- backend
Línea de trabajo
Start with apps/server/src/server.ts at the cited restart path, then trace how the child worker is forked and how restart is triggered. Check the project’s existing process and logging tests, if present. Done means restart waits for the old worker to exit before forking, kills it after a timeout if needed, and logs child exit and error events.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Which app is this bug report for?
server
Issue description
On restart, child.kill() only sends SIGTERM and fork runs right after (server.ts#L43-L50).
- If the old game server still holds its port (4444/4445 in
nf new --serverprojects), the new worker fails withEADDRINUSE. - If a game ignores SIGTERM, the old worker is never killed.
- No
exit/errorhandler is attached to the child, so worker crashes go unreported (the editor isn't told either).
Found by reading the code path (not reproduced).
Expected: the new worker starts only once the old one has exited, and worker exits and errors are logged.
Suggested fix: wait for the old child's exit event (SIGKILL after a timeout) before forking, and log exit and error.
Found during a read-only audit of main @ 044c766 (2026-11-11).
Code sample
if (child) {
child.kill(); // SIGTERM, not awaited
child = undefined;
}
child = fork(join(dirname(__filename), "worker.js"), ...);
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
- Lenguaje dominante
- TypeScript
- Estrellas
- 1
- Forks
- 0
- Merge medio
- 17 h 25 min
- PR fusionados (30 d)
- 11
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de NanoForge-dev/Loader
-
app:client app:website enhancement refactor
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
NanoForge-dev/Loader#145 ·
Los mantenedores suelen responder en 1 día
-
chore(loader-client,loader-server): package.json entry points name files the build does not produceAbiertoapp:client app:server bug chore good first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
NanoForge-dev/Loader#144 ·
Los mantenedores suelen responder en 1 día
-
app:website bug good first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
NanoForge-dev/Loader#141 ·
Los mantenedores suelen responder en 1 día
-
app:website bug good first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
NanoForge-dev/Loader#140 ·
Los mantenedores suelen responder en 1 día
-
app:server bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
NanoForge-dev/Loader#138 ·
Los mantenedores suelen responder en 1 día
Todos los issues de NanoForge-dev/Loader
Issues similares
-
Mend: dependency security vulnerability
Dificultad 1/5 1-3 horas Aptitud para principiantes 65/100
fdm-monster/fdm-monster#5563 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
be-BOP-io-SA/be-BOP#2849 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 79/100
Los mantenedores suelen responder en 1 día
-
1️⃣ phase/under-investigation flaky/confirmed flaky/needs-decision type/bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
growilabs/growi#12246 · 3 comentarios ·
Los mantenedores suelen responder en 1 día
-
🐛 The Rulekeeper - An index run that gives up on the lock ends SucceededPosiblemente ocupada @github-actions la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
SSWConsulting/SSW.Rules#2809 · 1 comentario ·
Los mantenedores suelen responder en 1 día