Closed GoogleCodeExporter closed 9 years ago
This is working as designed.
Depending on the server, the server can only detect the clients disconnection
by failing to sending data or a
heartbeat to the client.
gwt-comet does not guarantee message delivery. If you require that you have to
build it at a higher level. I
would suggest using a WindowCloseListener to logout the client and invalidate
the CometSession so server
initiates the clean disconnection. You can also determine what you want to do
with the undelivered queued
messages in the CometSession. A WindowCloseListener of course is not guaranteed
to be run for example if
the browser crashes.
You can be notified of the individual comet responses getting terminated by
extending CometServlet and
overriding the cometTerminated(CometServletResponse cometResponse, boolean
serverInitiated) method. If
serverInitiated is false then you know it was the client disconnecting
unexpectedly.
http://code.google.com/p/gwt-
comet/source/browse/trunk/src/net/zschech/gwt/comet/server/CometServlet.java#168
Original comment by rich...@zschech.net
on 5 May 2010 at 1:13
Hi,
Thanks for the reply. I have now worked out a solution that fits my needs for
the
time being (involves invalidating the session on the client side so that the
backend
will start a new session when the browser is opened again).
However just a question - if it works as intended and is not a bug, why does it
log a
WARN message and prints a big stacktrace. This is just annoying if there is
nothing
you can do about it.. IMHO.
BR
Magnus
Original comment by magnus.o...@gmail.com
on 7 May 2010 at 1:37
Original issue reported on code.google.com by
magnus.o...@gmail.com
on 5 May 2010 at 5:32