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 + 349997 MBeanContainer uses weak references
+ 350533 Add "Origin" to the list of allowed headers in CrossOriginFilter + 350533 Add "Origin" to the list of allowed headers in CrossOriginFilter
+ 350634 Cleanup FileResource construction + 350634 Cleanup FileResource construction
+ 350642 Don't close SCEP during NIOBuffer manipulation
+ JETTY-1342 Recreate selector in change task + JETTY-1342 Recreate selector in change task
+ JETTY-1390 RewriteHandler handles encoded URIs + JETTY-1390 RewriteHandler handles encoded URIs

View File

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