From 4c584dff87e66273d60e736e878c5b95e7f51041 Mon Sep 17 00:00:00 2001 From: orbiter Date: Sat, 15 Mar 2008 10:46:55 +0000 Subject: [PATCH] disabled soLinger to prevent that too many connections stay open (it's a TEST!) git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@4565 6c8d7289-2bf4-0310-a012-ef5d649a1542 --- source/de/anomic/http/httpc.java | 2 +- source/de/anomic/server/serverCore.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/source/de/anomic/http/httpc.java b/source/de/anomic/http/httpc.java index 02bda454c..4b9919cd8 100644 --- a/source/de/anomic/http/httpc.java +++ b/source/de/anomic/http/httpc.java @@ -400,7 +400,7 @@ public final class httpc { assert timeout >= 1000; this.socket.setSoTimeout(timeout); // waiting time for read this.socket.setTcpNoDelay(true); // no accumulation until buffer is full - this.socket.setSoLinger(true, timeout); // wait for all data being written on close() + this.socket.setSoLinger(false, timeout); // !wait for all data being written on close() this.socket.setSendBufferSize(1440); // read http://www.cisco.com/warp/public/105/38.shtml this.socket.setReceiveBufferSize(1440); // read http://www.cisco.com/warp/public/105/38.shtml diff --git a/source/de/anomic/server/serverCore.java b/source/de/anomic/server/serverCore.java index a877c83c0..b880a8274 100644 --- a/source/de/anomic/server/serverCore.java +++ b/source/de/anomic/server/serverCore.java @@ -420,7 +420,7 @@ public final class serverCore extends serverAbstractThread implements serverThre controlSocket.setTcpNoDelay(true); // set a non-zero linger, that means that a socket.close() blocks until all data is written - controlSocket.setSoLinger(true, this.timeout); + controlSocket.setSoLinger(false, this.timeout); // ensure that MTU-48 is not exceeded to prevent that routers cannot handle large data packets // read http://www.cisco.com/warp/public/105/38.shtml for explanation