You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@guacamole.apache.org by GitBox <gi...@apache.org> on 2022/09/28 17:26:18 UTC

[GitHub] [guacamole-client] jmuehlner commented on a diff in pull request #764: GUACAMOLE-1687: Leverage network activity to ensure keep-alive pings are sent.

jmuehlner commented on code in PR #764:
URL: https://github.com/apache/guacamole-client/pull/764#discussion_r982681501


##########
guacamole-common-js/src/main/webapp/modules/Client.js:
##########
@@ -42,7 +42,36 @@ Guacamole.Client = function(tunnel) {
     var currentState = STATE_IDLE;
     
     var currentTimestamp = 0;
-    var pingInterval = null;
+
+    /**
+     * The rough number of milliseconds to wait between sending keep-alive
+     * pings. This may vary depending on how frequently the browser allows
+     * timers to run, as well as how frequently the client receives messages
+     * from the server.
+     *
+     * @private
+     * @constant
+     * @type {!number}
+     */
+    var KEEP_ALIVE_FREQUENCY = 5000;

Review Comment:
   We use the `const` keyword pretty extensively in the webapp, though not yet in `guacamole-common-js`. Do you think it'd be appropriate to use that here?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@guacamole.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org