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:
parent
97291cc28a
commit
c2a6df4c47
|
@ -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
|
||||||
|
|
||||||
|
|
|
@ -154,49 +154,38 @@ 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
|
||||||
synchronized(bbuf)
|
|
||||||
|
try
|
||||||
{
|
{
|
||||||
try
|
synchronized(bbuf)
|
||||||
{
|
|
||||||
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)
|
|
||||||
{
|
{
|
||||||
try
|
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());
|
close();
|
||||||
bbuf.position(0);
|
|
||||||
}
|
}
|
||||||
|
catch (IOException xx)
|
||||||
|
{
|
||||||
|
Log.ignore(xx);
|
||||||
|
}
|
||||||
|
throw x;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue