From dd7511a72107a54d219a8076d5b6154679c9c4ea Mon Sep 17 00:00:00 2001 From: Simone Bordet Date: Fri, 28 Jan 2011 13:36:38 +0000 Subject: [PATCH] Fixes 335681 (Improve ChannelEndPoint.close() to avoid spinning). git-svn-id: svn+ssh://dev.eclipse.org/svnroot/rt/org.eclipse.jetty/jetty/trunk@2704 7e9141cc-0065-0410-87d8-b60c137991c4 --- VERSION.txt | 3 ++- .../eclipse/jetty/io/nio/ChannelEndPoint.java | 18 +++++++++++++----- 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/VERSION.txt b/VERSION.txt index 33476abcf66..be81ff89476 100644 --- a/VERSION.txt +++ b/VERSION.txt @@ -29,6 +29,7 @@ jetty-7.3.0-SNAPSHOT + 334311 fix buffer reuse issue in CachedExchange + 335361 Fixed 'jetty.sh check' to show current PID when JETTY_PID env. variable is set + 335641 Sweep for Windows selectKey.interestOps!=endp.interestOps for undispatched end points + + 335681 Improve ChannelEndPoint.close() to avoid spinning jetty-7.2.2.v20101205 5 December 2010 + JETTY-1308 327109 (re)fixed AJP handling of empty packets @@ -44,7 +45,7 @@ jetty-7.2.2.v20101205 5 December 2010 + 330229 Jetty tries to parse META-INF/*.tld when jsp-api is not on classpath, causing DTD entity resoluton to fail + 330265 start.jar --stop kills --exec subprocess + 330417 Atomic PUT in PutFilter - + 330419 Reloading webapp duplicates StandardDescriptorProcessor + + 330419 Reloading webapp duplicates StandardDescriptorProcessor + 330686 OSGi: Make org.eclipse.jetty.jsp-2.1 a fragment of org.apache.jasper.glassfish + 330732 Removed System.err debugging + 330764 Command line properties passed to start.jar --exec diff --git a/jetty-io/src/main/java/org/eclipse/jetty/io/nio/ChannelEndPoint.java b/jetty-io/src/main/java/org/eclipse/jetty/io/nio/ChannelEndPoint.java index bcd35793bdf..734b66abde4 100644 --- a/jetty-io/src/main/java/org/eclipse/jetty/io/nio/ChannelEndPoint.java +++ b/jetty-io/src/main/java/org/eclipse/jetty/io/nio/ChannelEndPoint.java @@ -27,7 +27,6 @@ import org.eclipse.jetty.io.EndPoint; import org.eclipse.jetty.util.StringUtil; import org.eclipse.jetty.util.log.Log; - /** * Channel End Point. *

Holds the channel and socket for an NIO endpoint. @@ -80,7 +79,7 @@ public class ChannelEndPoint implements EndPoint { _local=_remote=null; } - + } public boolean isBlocking() @@ -118,14 +117,23 @@ public class ChannelEndPoint implements EndPoint socket.shutdownOutput(); } } - + /* (non-Javadoc) * @see org.eclipse.io.EndPoint#close() */ public void close() throws IOException { if (_socket!=null && !_socket.isOutputShutdown()) - _socket.shutdownOutput(); + { + try + { + _socket.shutdownOutput(); + } + catch (IOException x) + { + Log.ignore(x); + } + } _channel.close(); } @@ -439,7 +447,7 @@ public class ChannelEndPoint implements EndPoint { return false; } - + /* ------------------------------------------------------------ */ public int getMaxIdleTime() {