Index: modules/jetty/src/main/java/org/mortbay/io/bio/SocketEndPoint.java =================================================================== --- modules/jetty/src/main/java/org/mortbay/io/bio/SocketEndPoint.java (revision 2580) +++ modules/jetty/src/main/java/org/mortbay/io/bio/SocketEndPoint.java (working copy) @@ -57,7 +57,10 @@ */ public void close() throws IOException { - _socket.close(); + if (!_socket.isClosed() && !_socket.isOutputShutdown()) { + _socket.shutdownOutput(); + } + _in=null; _out=null; } Index: modules/jetty/src/main/java/org/mortbay/io/nio/ChannelEndPoint.java =================================================================== --- modules/jetty/src/main/java/org/mortbay/io/nio/ChannelEndPoint.java (revision 2580) +++ modules/jetty/src/main/java/org/mortbay/io/nio/ChannelEndPoint.java (working copy) @@ -86,26 +86,14 @@ { if (_channel.isOpen()) { - try + if (_channel instanceof SocketChannel) { - if (_channel instanceof SocketChannel) - { - // TODO - is this really required? - Socket socket= ((SocketChannel)_channel).socket(); - try - { - socket.shutdownOutput(); - } - finally - { - socket.close(); - } + // TODO - is this really required? + Socket socket= ((SocketChannel)_channel).socket(); + if (!socket.isClosed() && !socket.isOutputShutdown()) { + socket.shutdownOutput(); } } - finally - { - _channel.close(); - } } }