Skip to content

Commit 143bb46

Browse files
committed
When unable to complete sendfile request, ensure the Processor will be added to the cache only once. git-svn-id: https://svn.apache.org/repos/asf/tomcat/tc7.0.x/trunk@1777471 13f79535-47bb-0310-9956-ffa450edef68
1 parent bb5f92c commit 143bb46

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

java/org/apache/tomcat/util/net/NioEndpoint.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1413,11 +1413,15 @@ public SendfileState processSendfile(SelectionKey sk, KeyAttachment attachment,
14131413
}
14141414
}catch ( IOException x ) {
14151415
if ( log.isDebugEnabled() ) log.debug("Unable to complete sendfile request:", x);
1416-
cancelledKey(sk,SocketStatus.ERROR,false);
1416+
if (!calledByProcessor) {
1417+
cancelledKey(sk,SocketStatus.ERROR,false);
1418+
}
14171419
return SendfileState.ERROR;
14181420
}catch ( Throwable t ) {
14191421
log.error("",t);
1420-
cancelledKey(sk, SocketStatus.ERROR, false);
1422+
if (!calledByProcessor) {
1423+
cancelledKey(sk, SocketStatus.ERROR, false);
1424+
}
14211425
return SendfileState.ERROR;
14221426
}
14231427
}

webapps/docs/changelog.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,10 @@
125125
when configured with an address of <code>0.0.0.0</code> or
126126
<code>::</code>. (markt)
127127
</fix>
128+
<fix>
129+
<bug>60409</bug>: When unable to complete sendfile request, ensure the
130+
Processor will be added to the cache only once. (markt/violetagg)
131+
</fix>
128132
</changelog>
129133
</subsection>
130134
<subsection name="Jasper">

0 commit comments

Comments
 (0)