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

Pusher doesn't reconnect when network is disconnected for ~5 min

Aperta
#210 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
18/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
java
Ambito
networking

Direzione di ricerca

The payload names no files. Start from the connection lifecycle and reconnect handling in the client, and from the changedConnectionState listener the reporter says fires only on initial connect. The reporter's snippets use reconnectAttemptsMax and maxReconnectGapInSeconds, which look like Swift-client syntax, so first check whether this Java client exposes those settings. Done means the client reconnects and reports a live socket ID after a 5-minute network outage. Reproducing that needs a way to drop the network for several minutes.

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

Descrizione

bug

Pusher doesn't reconnect when network is disconnected for ~5 min.

Steps to reproduce:

Connect to Pusher and subscribe to channel. Events are received as usual.
Turn off Wifi for ~5 min.
Turn on Wifi.
What I can observe is that there is a Disconnection message in the web console once Wifi is turned on, but in the app, pusher.connection.connectionState still returns connected and pusher.connection.socketId returns the disconnected(as seen in the web console) socket id.
It works fine if Wifi is turned off for less than 2-3 min - it auto reconnects and receives events again, it's only an issue when it's disconnected for ~5 min or more.

I've also added

    pusher.connection.reconnectAttemptsMax = nil
    pusher.connection.maxReconnectGapInSeconds = 60

but it doesn't change anything.

I've also added a listener on changedConnectionState, but the only time it fires is during the initial connection setup - it goes from connecting to connected.

Lingua principale
Java
Stelle
315
Fork
140
Merge medio
10g 14h
PR unite (30g)
5

Preparare l'ambiente

  • Nessun Dockerfile né file Docker Compose
  • Ha un 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 pusher/pusher-websocket-java

Tutte le issue di pusher/pusher-websocket-java

Issue simili

Altre issue su Java

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.