Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Shutting down adapter

Aperta
#13 4 commenti 1 reazione 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
43/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
postgresql, typescript
Ambito
backend, databases

Direzione di ricerca

Start from the adapter shutdown path reached by socketIo.of('/').adapter.close() and socketIo.close(), then inspect the 30s cleanup timer and approximately 2s reconnect timer described in the report. Done means socketIo.close() alone leaves no active timers and the Node.js process exits without the workaround; add or update coverage for shutdown behavior if the repository provides a relevant test entry point.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

I tried shutting down socket IO with the adapter installed. The node js process won't exit, since there are still timers active.

I expect this to work:

    socketIo.close();

There are still two timers running afterwards: the 30s cleanup timer and the ~2s reconnect timer

The workaround I found is:

    await socketIo.of('/').adapter.close(); // < this will clean the 30s cleanup timer
    socketIo.close();
    pool.connect = () => new Promise(() => {}); // < this will make the reconnect timer get blocked forever on the first reconnect attempt.
Lingua principale
TypeScript
Stelle
28
Fork
9
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

  • Include un Dockerfile o un file Docker Compose
  • Nessun modello di pull request
  • Nessuna guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di socketio/socket.io-postgres-adapter

Tutte le issue di socketio/socket.io-postgres-adapter

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.