350642 Do not close SCEP during NIOBuffer manipulation

git-svn-id: svn+ssh://dev.eclipse.org/svnroot/rt/org.eclipse.jetty/jetty/trunk@3436 7e9141cc-0065-0410-87d8-b60c137991c4
This commit is contained in:
Greg Wilkins 2011-06-29 02:51:09 +00:00
parent 97291cc28a
commit c2a6df4c47
2 changed files with 23 additions and 33 deletions

View File

@ -18,6 +18,7 @@ jetty-7.4.3-SNAPSHOT
+ 349997 MBeanContainer uses weak references
+ 350533 Add "Origin" to the list of allowed headers in CrossOriginFilter
+ 350634 Cleanup FileResource construction
+ 350642 Don't close SCEP during NIOBuffer manipulation
+ JETTY-1342 Recreate selector in change task
+ JETTY-1390 RewriteHandler handles encoded URIs

View File

@ -154,49 +154,38 @@ public class ChannelEndPoint implements EndPoint
final NIOBuffer nbuf = (NIOBuffer)buf;
final ByteBuffer bbuf=nbuf.getByteBuffer();
//noinspection SynchronizationOnLocalVariableOrMethodParameter
synchronized(bbuf)
try
{
try
{
bbuf.position(buffer.putIndex());
len=_channel.read(bbuf);
if (len<0 && isOpen() && !isInputShutdown())
{
try
{
shutdownInput();
}
catch(IOException x)
{
Log.ignore(x);
try
{
close();
}
catch (IOException xx)
{
Log.ignore(xx);
}
}
}
}
catch (IOException x)
synchronized(bbuf)
{
try
{
close();
bbuf.position(buffer.putIndex());
len=_channel.read(bbuf);
}
catch (IOException xx)
finally
{
Log.ignore(xx);
buffer.setPutIndex(bbuf.position());
bbuf.position(0);
}
throw x;
}
finally
if (len<0 && isOpen() && !isInputShutdown())
shutdownInput();
}
catch (IOException x)
{
try
{
buffer.setPutIndex(bbuf.position());
bbuf.position(0);
close();
}
catch (IOException xx)
{
Log.ignore(xx);
}
throw x;
}
}
else