rickilama54 / gwt-comet

Automatically exported from code.google.com/p/gwt-comet
0 stars 0 forks source link

Multiple comet clients #5

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
When multiple comet clients are started there is a connect/disconnect loop as 
shown in the attachment
Would you please let me know how to fix this.

Thanks!

Original issue reported on code.google.com by rama...@gmail.com on 27 Mar 2010 at 12:17

Attachments:

GoogleCodeExporter commented 9 years ago
This is just the sample application when you log in two times with the same 
user nick.

Not a comet-gwt bug

Original comment by mmm1...@gmx.net on 13 Aug 2011 at 7:03

GoogleCodeExporter commented 9 years ago
I embedded gwt-comet in a (fairly big) webapplication and I also got this 
disconnect/connect-loops.

In my application log (on client side):
[...]
[INFO] [gwt] - disconnected
[INFO] [gwt] - connected 15000
[INFO] [gwt] - disconnected
[INFO] [gwt] - disconnected
[INFO] [gwt] - connected 15000
[INFO] [gwt] - disconnected
[INFO] [gwt] - connected 15000
[INFO] [gwt] - disconnected
[INFO] [gwt] - connected 15000
[INFO] [gwt] - disconnected
[INFO] [gwt] - connected 15000
[INFO] [gwt] - connected 15000
[INFO] [gwt] - disconnected
[INFO] [gwt] - connected 15000
[INFO] [gwt] - disconnected
[INFO] [gwt] - disconnected
[INFO] [gwt] - connected 15000
[...]

I also attached a screenshot of my browser with firebug running.

Perhaps some descriptions about what my app is doing:
- my app generates a random uuid which is sent to the server in order to 
recognize when a user opened the app in a further tab.
- if a uuid-change for a session is recognized, the server destroys the http 
session. The session-listener then calls cometSession.invalidate(); which 
should stop the comet on server-side.
- after this a new http session and a new comet session is created with 
CometServlet.getCometSession(httpSession); 

I could circumvent the problem by notifying the old app before destroying the 
cometsession. When the app receives something like "cometSessionInvalidated" or 
something, it stops the cometclient and there is no endless loop anymore. The 
old app then displays in a modal popup that the app can be closed because it 
was opened in another tab.

Original comment by thomas.p...@pcb-dev.com on 6 Mar 2012 at 1:33

Attachments:

GoogleCodeExporter commented 9 years ago
I got the same problem, and the problem happened on IE9 and IE10
Anyone has any idea around this?

Original comment by szetocha...@gmail.com on 10 Jun 2014 at 3:43