Open pablocarle opened 1 year ago
Possibly related: https://stackoverflow.com/questions/49408031/websockets-in-chrome-and-firefox-disconnecting-after-one-minute-of-inactivity Basically if the Zowe Desktop does not currently implement a custom ping to keep the socket open on inactivity it may be relying on the browser implementation. By looking at the network tab in Chrome I don't see the ping messages, but the implementation between the websocket client on the browser and the client on the Gateway side is different, since going directly to the Zowe Desktop results in a longer session even on inactivity.
Ideally I think there should be some implementation of a ping to keep the session open as long as the UI is open, this would work even with Gateway as it relies the messages.
It seems like we can add pings in the terminals because the server code just ignores messages that arent in a certain json format. So, we just need some interval code on the websocket code within here https://github.com/zowe/tn3270-ng2/blob/v2.x/staging/webClient/src/app/terminal.ts for example.
Some commercial terminals has a setting to press a key each several minutes. You can define which key and interval. This is another way how to keep the connection open.
Describe the bug
When accessing the Zowe Desktop through the Zowe API ML Gateway, and opening a WebSocket session by opening for example the TN 3270 emulator, the session will be closed after a 5 minute idling time.
This is mostly a question, to understand if the Zowe Desktop in standalone mode has a similar limitation from the client perspective, where it will close idling websockets after 5 minutes, or if there's something to be improved in the API ML Gateway (which acts as both a WebSocket server and client for the ZLUX)
Is this something that are you guys already aware of?
Steps to Reproduce
Expected behavior
Screenshots (if needed)
Logs
Describe your environment
node --version
):java -version
):Additional context