From 9a2afe88d4b551b57228775e0ad51b76dd2f2d90 Mon Sep 17 00:00:00 2001 From: theli Date: Tue, 25 Oct 2005 10:21:00 +0000 Subject: [PATCH] *) Deactivating unlimited timeout for persistent connections because this could cause problems with clients which do not shutdown persistent connections properly. - Setting timeout for idle persistent connections to 30 minutes git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@983 6c8d7289-2bf4-0310-a012-ef5d649a1542 --- source/de/anomic/server/serverCore.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/source/de/anomic/server/serverCore.java b/source/de/anomic/server/serverCore.java index 39a3ea817..abf1d640a 100644 --- a/source/de/anomic/server/serverCore.java +++ b/source/de/anomic/server/serverCore.java @@ -1000,8 +1000,13 @@ public final class serverCore extends serverAbstractThread implements serverThre */ } else if (result instanceof Boolean) { if (((Boolean) result).equals(TERMINATE_CONNECTION)) break; - // deactivating timeout. this is needed because of persistent connections - if (!this.controlSocket.isClosed()) this.controlSocket.setSoTimeout(0); + + /* + * setting timeout to a very high level. + * this is needed because of persistent connection + * support. + */ + if (!this.controlSocket.isClosed()) this.controlSocket.setSoTimeout(30*60*1000); } else if (result instanceof String) { if (((String) result).startsWith("!")) { result = ((String) result).substring(1);