343923 check for half closed
git-svn-id: svn+ssh://dev.eclipse.org/svnroot/rt/org.eclipse.jetty/jetty/trunk@3079 7e9141cc-0065-0410-87d8-b60c137991c4
This commit is contained in:
parent
48fb924a46
commit
bda6438013
|
@ -432,7 +432,7 @@ public abstract class AbstractGenerator implements Generator
|
|||
{
|
||||
flushBuffer();
|
||||
|
||||
while (now<end && (content!=null && content.length()>0 ||buffer!=null && buffer.length()>0) && _endp.isOpen())
|
||||
while (now<end && (content!=null && content.length()>0 ||buffer!=null && buffer.length()>0) && _endp.isOpen()&& !_endp.isOutputShutdown())
|
||||
{
|
||||
blockForOutput(end-now);
|
||||
now=System.currentTimeMillis();
|
||||
|
@ -440,7 +440,7 @@ public abstract class AbstractGenerator implements Generator
|
|||
}
|
||||
|
||||
// make sure buffered data is also flushed
|
||||
while (now<end && _endp.isBufferingOutput() && _endp.isOpen())
|
||||
while (now<end && _endp.isBufferingOutput() && _endp.isOpen() && !_endp.isOutputShutdown())
|
||||
{
|
||||
if (!_endp.isBlocking())
|
||||
_endp.blockWritable(end-now);
|
||||
|
|
|
@ -354,12 +354,15 @@ public class SelectChannelEndPoint extends ChannelEndPoint implements AsyncEndPo
|
|||
{
|
||||
synchronized (this)
|
||||
{
|
||||
if (!isOpen() || isOutputShutdown())
|
||||
throw new EofException();
|
||||
|
||||
long now=_selectSet.getNow();
|
||||
long end=now+timeoutMs;
|
||||
try
|
||||
{
|
||||
_writeBlocked=true;
|
||||
while (isOpen() && _writeBlocked)
|
||||
while (isOpen() && _writeBlocked && !isOutputShutdown())
|
||||
{
|
||||
try
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue