io.fetchSockets() sometimes works across instances, sometimes not

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

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
35/100
Tipo di issue
Bug
Chiarezza
Da chiarire
Stato di attività
Tranquilla
Stack tecnologico
redis, typescript

Direzione di ricerca

Start with a minimal multi-instance reproduction using socket.io 4.8.1, @socket.io/redis-adapter 8.3.0, ioredis 5.5.0, and socket.io-client 4.8.1. Compare the Redis and adapter setup for each instance, then determine when io.fetchSockets() omits remote clients; the issue is done when the cause and reliable behavior are established, with a regression test or clear limitation documented.

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

Descrizione

I have an app where I need to send a list of all connected clients and rooms to all connected clients.
Sometimes I'm able to get all clients across multiple instances with io.fetchSockets() and other times it will only grab clients from the same instance.

I'm not exactly sure what to try at this point, but I'm almost certain this has to be the issue.

Here is related dependencies:

"@socket.io/redis-adapter": "^8.3.0",
"socket.io": "^4.8.1",
"socket.io-client": "^4.8.1"
"ioredis": "^5.5.0",
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

  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-redis-adapter

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

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.