This commit is contained in:
Greg Wilkins 2011-09-29 17:36:23 +10:00
parent 7cb3246624
commit 79e431f330
5 changed files with 15 additions and 5 deletions

View File

@ -939,7 +939,15 @@ public class HttpParser implements Parser
if (_buffer.space() == 0)
throw new HttpException(HttpStatus.REQUEST_ENTITY_TOO_LARGE_413, "FULL "+(_buffer==_body?"body":"head"));
return _endp.fill(_buffer);
try
{
return _endp.fill(_buffer);
}
catch(IOException e)
{
LOG.debug(e);
throw (e instanceof EofException) ? e:new EofException(e);
}
}
return -1;

View File

@ -264,7 +264,6 @@ public class ChannelEndPoint implements EndPoint
{
throw new IOException("Not Implemented");
}
return len;
}

View File

@ -539,8 +539,10 @@ public class SelectChannelEndPoint extends ChannelEndPoint implements AsyncEndPo
cancelIdle();
if (_open)
{
_open=false;
_selectSet.destroyEndPoint(this);
_open=false;
}
_key = null;
}
}

View File

@ -946,7 +946,8 @@ public abstract class SelectorManager extends AbstractLifeCycle implements Dumpa
final CountDownLatch latch = new CountDownLatch(1);
addChange(new ChangeTask(){
addChange(new ChangeTask()
{
public void run()
{
dumpKeyState(dump);

View File

@ -388,7 +388,7 @@ public class SslSelectChannelEndPoint extends SelectChannelEndPoint
}
// return the number of unencrypted bytes filled.
int filled=buffer.length()-size;
if (filled==0 && isInputShutdown())
if (filled==0 && (isInputShutdown() || !isOpen()))
return -1;
return filled;