kryo - Kryonet - double incoming packets -


okay. receiving packet once, it's block fired twice. example:

i have block this:

           if (object instanceof initthegame) {                 system.out.println("starttttttttttttttttttttttttttttttttttttttt");                 awaitopponent.dismiss();                 isinqueue = false;                 matchrunning = true; // handles while loop inside thread sends data server                 isinmatch = true; // handles view (checks if exit app)                 // new gamepacketsender().start();                 casualgameholder.gameloop.start();                 new sensor(act, casualgameholder.gameloop);                 touchlistener = new touchlistener(casualgameholder.gameloop);                 this_layout.setontouchlistener(touchlistener);                  act.runonuithread(new runnable() {                     public void run() {                         gamestartcountdown countdown = new gamestartcountdown(4000,1000);                         countdown.start();                         countdowndialog = new dialog(act);                         countdowndialog.show();                         countdowndialog.setcancelable(false);                     }                 });             } 

in console (log_trace) can see, packet received once, "starttttttttttttttttt" system.out shown twice, countdown shown twice etc.

i don't want post whole code, cause it's huge , hard understand. may caused overflowing buffer on server, or maybe have somehow 2 connections opened @ same time on 1 device? if there experienced person kryonet, grateful help.

caused registering multiple listeners (should null after game complete).


Comments

Popular posts from this blog

javascript - Slick Slider width recalculation -

jsf - PrimeFaces Datatable - What is f:facet actually doing? -

angular2 services - Angular 2 RC 4 Http post not firing -