Author: markt
Date: Wed Oct  8 19:08:31 2014
New Revision: 1630203

URL: http://svn.apache.org/r1630203
Log:
Add debug logging for IOEs while reading data from server

Modified:
    tomcat/trunk/java/org/apache/tomcat/websocket/LocalStrings.properties
    tomcat/trunk/java/org/apache/tomcat/websocket/WsFrameClient.java

Modified: tomcat/trunk/java/org/apache/tomcat/websocket/LocalStrings.properties
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/websocket/LocalStrings.properties?rev=1630203&r1=1630202&r2=1630203&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/websocket/LocalStrings.properties 
(original)
+++ tomcat/trunk/java/org/apache/tomcat/websocket/LocalStrings.properties Wed 
Oct  8 19:08:31 2014
@@ -62,6 +62,8 @@ wsFrame.sessionClosed=The client data ca
 wsFrame.textMessageTooBig=The decoded text message was too big for the output 
buffer and the endpoint does not support partial messages
 wsFrame.wrongRsv=The client frame set the reserved bits to [{0}] for a message 
with opCode [{1}] which was not supported by this endpoint
 
+wsFrameClient.ioe=Failure while reading data sent by server
+
 wsRemoteEndpoint.closed=Message will not be sent because the WebSocket session 
has been closed
 wsRemoteEndpoint.closedDuringMessage=The remainder of the message will not be 
sent because the WebSocket session has been closed
 wsRemoteEndpoint.closedOutputStream=This method may not be called as the 
OutputStream has been closed

Modified: tomcat/trunk/java/org/apache/tomcat/websocket/WsFrameClient.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/websocket/WsFrameClient.java?rev=1630203&r1=1630202&r2=1630203&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/websocket/WsFrameClient.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/websocket/WsFrameClient.java Wed Oct  8 
19:08:31 2014
@@ -23,8 +23,16 @@ import java.nio.channels.CompletionHandl
 import javax.websocket.CloseReason;
 import javax.websocket.CloseReason.CloseCodes;
 
+import org.apache.juli.logging.Log;
+import org.apache.juli.logging.LogFactory;
+import org.apache.tomcat.util.res.StringManager;
+
 public class WsFrameClient extends WsFrameBase {
 
+    private final Log log = LogFactory.getLog(WsFrameClient.class);
+    private static final StringManager sm =
+            StringManager.getManager(Constants.PACKAGE_NAME);
+
     private final AsyncChannelWrapper channel;
     private final CompletionHandler<Integer,Void> handler;
     // Not final as it may need to be re-sized
@@ -111,6 +119,7 @@ public class WsFrameClient extends WsFra
                 // continuing to send a message after the server sent a close
                 // control message.
                 if (isOpen()) {
+                    log.debug(sm.getString("wsFrameClient.ioe", e));
                     close(e);
                 }
             }



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

Reply via email to