You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by kp...@apache.org on 2014/02/13 19:12:54 UTC

svn commit: r1567993 - /tomcat/trunk/webapps/examples/websocket/echo.xhtml

Author: kpreisser
Date: Thu Feb 13 18:12:53 2014
New Revision: 1567993

URL: http://svn.apache.org/r1567993
Log:
Log close code and reason when the Websocket connection is closed.

Modified:
    tomcat/trunk/webapps/examples/websocket/echo.xhtml

Modified: tomcat/trunk/webapps/examples/websocket/echo.xhtml
URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/examples/websocket/echo.xhtml?rev=1567993&r1=1567992&r2=1567993&view=diff
==============================================================================
--- tomcat/trunk/webapps/examples/websocket/echo.xhtml (original)
+++ tomcat/trunk/webapps/examples/websocket/echo.xhtml Thu Feb 13 18:12:53 2014
@@ -81,9 +81,9 @@
             ws.onmessage = function (event) {
                 log('Received: ' + event.data);
             };
-            ws.onclose = function () {
+            ws.onclose = function (event) {
                 setConnected(false);
-                log('Info: WebSocket connection closed.');
+                log('Info: WebSocket connection closed, Code: ' + event.code + (event.reason == "" ? "" : ", Reason: " + event.reason));
             };
         }
 



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org