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

Why api msg send one time but pusher event got message twice

Aperta
#274 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
18/100
Tipo di issue
Bug
Chiarezza
Da chiarire
Stato di attività
Ferma
Stack tecnologico
android, java

Direzione di ricerca

The payload names no source file, only the reporter's sample: a Pusher connection created in an Application class, and a channel.bind call with a SubscriptionEventListener inside a fragment activity. Start by reproducing with one bind and one connection, and check whether repeated subscribe or bind calls register the listener twice. The report gives no expected behaviour and no decision from maintainers, so confirm the scope with the maintainers before writing a fix.

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

Descrizione

question
What is the issue?

Why api msg send one time but pusher event got message twice

Is it a crash report? Submit stack traces or anything that you think would help

no crash

Any improvements you suggest

remove redundant data push at the same time
debug_console_pusher
debug_log_android

sample code:
in Application
` pusherOptions = new PusherOptions().setCluster(cluster_pusher);

 push = new Pusher(key_pusher, pusherOptions);

 push.connect();`

in fragment activity
` if (AppControll.push.getConnection().getState().compareTo(ConnectionState.CONNECTING) == 0){
}
if (AppControll.push.getConnection().getState().compareTo(ConnectionState.CONNECTED) == 0){
}
if (AppControll.push.getConnection().getState().compareTo(ConnectionState.DISCONNECTING) == 0){
}
if (AppControll.push.getConnection().getState().compareTo(ConnectionState.DISCONNECTED) == 0){
AppControll.push.connect();
}
if (AppControll.push.getConnection().getState().compareTo(ConnectionState.RECONNECTING) == 0){
}

    if (AppControll.push.getChannel(Config.TOPIC_GLOBAL) == null){
        channel = AppControll.push.subscribe(Config.TOPIC_GLOBAL);
    }else{
        channel = AppControll.push.getChannel(Config.TOPIC_GLOBAL);
    }

    channel.bind(Config.PUSHER_EVENT, new SubscriptionEventListener() {
        @Override
        public void onEvent(PusherEvent event) {
            Log.i("Pusher", "Received event with data: " + event.getData());   <-- this received twice.
       }
   }

`

CC @pusher/mobile

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

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.