Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

Shutdown is wrong in all three: Go blocks a fixed 30s without draining, Rust aborts in-flight requests, TS has no deadline

Cerrado
#28 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
68/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
go, rust, typescript
Área
api, backend

Línea de trabajo

Empieza por los bucles accept de Rust y las tareas serve_connection en curso, y luego compara el comportamiento de referencia en go/main.go:92-97. Audita el comportamiento de TypeScript server.close() como se indica. Se considera terminado cuando el apagado detiene las nuevas conexiones, agota las solicitudes activas durante un máximo de 30 segundos y finaliza tras completarse o cuando vence el plazo.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

Priority: P2 Type: Enhancement

Summary

On SIGTERM/SIGINT, the Go implementation drains in-flight requests via http.Server.Shutdown with a 30s timeout (go/main.go:92-97). The Rust implementation breaks its accept loops and exits main, which drops the tokio runtime — and with it any in-flight serve_connection tasks, aborting responses mid-flight.

Found during the code review of #27 (which rewrote the Rust shutdown path but preserved this pre-existing behavior — it is not a regression from that PR; the old single-listener code behaved the same way).

Affected implementation(s)

  • Rust
  • Go (reference behavior — already drains)
  • TypeScript (worth auditing while at it: confirm server.close() semantics wait for in-flight requests)

Expected behavior

On shutdown signal:

  1. Stop accepting new connections (already done).
  2. Allow in-flight requests to complete, up to a 30s deadline (matching Go).
  3. Exit after drain or deadline, whichever comes first.

Suggested fix (Rust)

Track connections in a tokio::task::JoinSet (or a counter + notify), and on shutdown call hyper's Connection::graceful_shutdown on active connections, then await the set with tokio::time::timeout(Duration::from_secs(30), ...).

Context

Split out from the review follow-ups on PR #27. Related: #25.

Lenguaje dominante
Rust
Estrellas
2
Forks
0
Merge medio
13 h 22 min
PR fusionados (30 d)
27

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de ChainSafe/docker-socket-policy

Todos los issues de ChainSafe/docker-socket-policy

Issues similares

Más issues de Rust

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.