Skip to content
This repository has been archived by the owner on Dec 4, 2018. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
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/tc8.0.x/trunk@1777469 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
markt-asf committed Jan 5, 2017
1 parent a4bcf7b commit 3dd2fec
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
8 changes: 6 additions & 2 deletions java/org/apache/tomcat/util/net/NioEndpoint.java
Expand Up @@ -1245,11 +1245,15 @@ public SendfileState processSendfile(SelectionKey sk, KeyAttachment attachment,
}
}catch ( IOException x ) {
if ( log.isDebugEnabled() ) log.debug("Unable to complete sendfile request:", x);
cancelledKey(sk,SocketStatus.ERROR);
if (!calledByProcessor) {
cancelledKey(sk,SocketStatus.ERROR);
}
return SendfileState.ERROR;
}catch ( Throwable t ) {
log.error("",t);
cancelledKey(sk, SocketStatus.ERROR);
if (!calledByProcessor) {
cancelledKey(sk, SocketStatus.ERROR);
}
return SendfileState.ERROR;
}
}
Expand Down
4 changes: 4 additions & 0 deletions webapps/docs/changelog.xml
Expand Up @@ -140,6 +140,10 @@
when configured with an address of <code>0.0.0.0</code> or
<code>::</code>. (markt)
</fix>
<fix>
<bug>60409</bug>: When unable to complete sendfile request, ensure the
Processor will be added to the cache only once. (markt/violetagg)
</fix>
</changelog>
</subsection>
<subsection name="Jasper">
Expand Down

0 comments on commit 3dd2fec

Please sign in to comment.