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-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to