Author: kkolinko
Date: Thu May 24 16:19:04 2012
New Revision: 1342315
URL: http://svn.apache.org/viewvc?rev=1342315&view=rev
Log:
Followup for r1340215
Move new log message below unreg() call and align it with similar debug
messages, fixing a couple of typos.
Modified:
tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java
Modified: tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java
URL:
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java?rev=1342315&r1=1342314&r2=1342315&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java Thu May 24
16:19:04 2012
@@ -1278,12 +1278,14 @@ public class NioEndpoint extends Abstrac
public boolean processSendfile(SelectionKey sk, KeyAttachment
attachment, boolean reg, boolean event) {
NioChannel sc = null;
- if (log.isTraceEnabled()) {
- log.trace("["+new
java.sql.Date(System.currentTimeMillis()).toGMTString()+"] Processing send
file. ["+sk+"] ");
- }
try {
unreg(sk, attachment, sk.readyOps());
SendfileData sd = attachment.getSendfileData();
+
+ if (log.isTraceEnabled()) {
+ log.trace("Processing send file for: " + sd.fileName);
+ }
+
//setup the file channel
if ( sd.fchannel == null ) {
File f = new File(sd.fileName);
@@ -1322,7 +1324,7 @@ public class NioEndpoint extends Abstrac
}
if ( sd.length <= 0 && sc.getOutboundRemaining()<=0) {
if (log.isDebugEnabled()) {
- log.debug("Send file complete for:"+sd.fileName);
+ log.debug("Send file complete for: "+sd.fileName);
}
attachment.setSendfileData(null);
try {
@@ -1345,9 +1347,9 @@ public class NioEndpoint extends Abstrac
cancelledKey(sk,SocketStatus.STOP);
return false;
}
- } else { //if ( attachment.interestOps() == 0 && reg ) {
+ } else {
if (log.isDebugEnabled()) {
- log.debug("OP_WRITE for sendilfe:"+sd.fileName);
+ log.debug("OP_WRITE for sendfile: " + sd.fileName);
}
if (event) {
add(attachment.getChannel(),SelectionKey.OP_WRITE);
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]