-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Websocket-Ping doesn't stop directly after graceful application exit #514
Comments
Not clear why you dispose an application after logout? The server-side shouldn't dispose the application. The browser is the application and is responsible for such events. |
Thank you for your follow-up question. In case e.g. the server is going down for maintenance or detects the session was killed, the application and launcher does get disposed. |
In this case, the client shows a banner and tries to re-connect. What do you expect? |
It's not the common application logout, it's more of a exit function, which logs out and disposes the launcher to free all used ressources instantly. The intent here is to tell the client to leave instead of to login again as it would be the case of a logout - but this is not what I intent to get out of this fix. My issue here is, that the client currently (as far as I can tell) can't handle a full graceful application exit (a far fetched comparison to the Java exit where the application window is closing). Back to the initial question:
If not, should there be one or is it intended to keep the ping-task and session data active by design? |
It's not implemented to destroy the application on server-side and leave the page on client-side. If there's a problem with banners, we will check it. The server-side stores all applications in http/intern sessions and the database objects (DBAccess, DBStorage) don't store records. So the UI (application, screens, databooks) consumes memory. If you do a logout, all/most resources should be closed and released. The current implementation on server, already handles disposed applications: //Application was disposed
if (launcher.isDisposed())
{
setStatus(Status.CLIENT_ERROR_GONE);
return null;
} and client should handle it. In this case it makes no sense to keep the websocket open. Additional banners should be suppressed but I guess this is not fully checked. |
also check #474 |
After exiting the current running application gracefully by calling launcher.dispose() after a logout(), the handled exitcode 1000 on closing the websocket connection is never sent by the server code and the sent "DISPOSE" isn't implemented.
The server just handles the 1000 exit code in AppProvider.tsx to stop the application:
And because the reconnectInterval is currently not cleared, the websocket will try to reconnect to a closed session.
This way, the initially displayed "410 - Gone" message from the response will change to the "server is not reachable" message and restart the websocket connection.
Is there currently a other preferred way to close the application?
The EXIT request currently seems only be used in the development commands and also restarts the application.
The text was updated successfully, but these errors were encountered: