[ 
https://issues.apache.org/jira/browse/WICKET-6954?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17488447#comment-17488447
 ] 

ASF GitHub Bot commented on WICKET-6954:
----------------------------------------

reiern70 commented on a change in pull request #499:
URL: https://github.com/apache/wicket/pull/499#discussion_r801101652



##########
File path: 
wicket-native-websocket/wicket-native-websocket-core/src/main/java/org/apache/wicket/protocol/ws/api/res/js/wicket-websocket-jquery.js
##########
@@ -139,6 +155,22 @@
                        }
                },
 
+               heartbeat: function () {
+                       clearTimeout(this.pingTimeout);
+                       // Set a timeout in order to check ping received
+                       this.pingTimeout = setTimeout(() => {
+                               this.ws.close();

Review comment:
       There  is no API at server side for this (onPing). I close connection => 
then recreated it that same way as when page was created => trigger a 
ConectedMessage with reconnect = true. This I plan to use in our app for 
delivering things to client what we failed not delivered because connection was 
gone. This is not a fake scenario. It is happening to us (some progress 
blocking dialog is staying in page sometimes because connection is broken and 
events fail to reach client).




-- 
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: commits-unsubscr...@wicket.apache.org

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


> create standard keep-alive/heartbeat like functionality for web-sockets
> -----------------------------------------------------------------------
>
>                 Key: WICKET-6954
>                 URL: https://issues.apache.org/jira/browse/WICKET-6954
>             Project: Wicket
>          Issue Type: Improvement
>            Reporter: Ernesto Reinaldo Barreiro
>            Assignee: Ernesto Reinaldo Barreiro
>            Priority: Major
>




--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to