I've done a work around with conversation message on the server where replyrepeating is within 2 seconds. Since the MessageQueue is null on browser close, I've killed the repeating Async task by setting cancel(true), thereby stopping the resend.
Should the ServerMessageBus handle this? How does the server know if the request from the browser had been cut off? There should be a way for Java NIO, to tell the server the browser had been cut other than let the session die.
This workaround only works with single browser connection. I get QueueUnavailableException from multiple browser, I'll raise a bug, looking at the code, there is no way for it to remove the message queue from the Workers.
Yes, we don't have a way to notify the server a client has disconnected other than experiencing a failure. This is a limit of COMET and long polling. Our WebSockets support will have the ability to detect a disconnect in real-time. But what you're describing is really tricky to do, which is why we use a heart beat model to detect if the client has died.
Can you give example about heartbeat model in errai ?