Unnecessary on("error") handlers
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 55/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Ferma
- Stack tecnologico
- redis, typescript
- Ambito
- backend, distributed-systems
Direzione di ricerca
Start in lib/index.ts around line 193, where the Redis client error handler is added during adapter construction. Inspect how existing error listeners are detected and verify the behavior when multiple namespaces share a client. Done means repeated namespace creation no longer adds unnecessary handlers or triggers MaxListenersExceededWarning while the missing-handler warning remains appropriate.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
The adapter constructor always adds an error to the redis clients here: https://github.com/socketio/socket.io-redis-adapter/blob/cdb55353f83c78cabe9788683e4dd93ac4cd50c9/lib/index.ts#L193
The handler just logs a warning if there are no other error handlers it
if (this.listenerCount("error") === 1) {
console.warn("missing 'error' handler on this Redis client");
}
Since this constructor is called every time a namespace is created in socket io, we end up adding multiple copies of this handler to the underlying redis client possibly triggering a MaxListenersExceededWarning.
Would it be possible to add these handlers conditionally only if the client does not have any already?
- Lingua principale
- TypeScript
- Stelle
- 2.8k
- Fork
- 485
- 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
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di socketio/socket.io-redis-adapter
-
question
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
socketio/socket.io-redis-adapter#574 · 1 commento ·
-
io.fetchSockets() fails with createSentinelForse di nuovo libera Una pull request per questa issue è stata chiusa senza essere unita. Aperta
Difficoltà 3/5 1-2 giorni Idoneità per principianti 45/100
socketio/socket.io-redis-adapter#573 · 1 commento ·
-
`hasBinary()` throws `RangeError: Maximum call stack size exceeded` on Mongoose documents, silently dropping events in sharded modeForse già presa @junsj119 l’ha presa 96 giorni fa. Aperta
Difficoltà 3/5 1-2 giorni Idoneità per principianti 48/100
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 45/100
socketio/socket.io-redis-adapter#561 · 1 commento ·
Tutte le issue di socketio/socket.io-redis-adapter
Issue simili
-
Difficoltà 1/5 1-3 ore Idoneità per principianti 86/100
g1331/phantom-circuit#93 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
compiler
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
HerringtonDarkholme/hd-lang#1699 ·
I maintainer di solito rispondono entro 1 giorno
-
account bug communication lecture
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno