Garbled page on restart when using @Push(transport=Transport.LONG_POLLING)

Hi,

When we restart our server, any client with an open window will get a garbled page.

Without @Push, if I restart the server and then try to do something in the client, I will be redirected to the login page.
What happens is that the vaadin client does an ajax request. The server no longer accepts the user, and responds with the login page. The vaadin client sees that the response isn’t a valid json and then checks if it contains the magic string “Vaadin-Refresh:”. If so, it opens the following url instead.

Now, when I introduce @Push, as soon as I kill the server, I see that the server starts to send PUSH requests every 5 seconds or so. When I then start the server again, it is one of these that will get the login page as response, and it presumably doesn’t look for the “magic string”, and we end up with a garbled page.

Is there a way to handle this in a way that gives the user a better experience?

This is with Vaadin 7.6.3 and Wildfly 8.2