*) 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
pull/1/head
theli 20 years ago
parent 1aa4ba8b62
commit 9a2afe88d4

@ -1000,8 +1000,13 @@ public final class serverCore extends serverAbstractThread implements serverThre
*/ */
} else if (result instanceof Boolean) { } else if (result instanceof Boolean) {
if (((Boolean) result).equals(TERMINATE_CONNECTION)) break; 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) { } else if (result instanceof String) {
if (((String) result).startsWith("!")) { if (((String) result).startsWith("!")) {
result = ((String) result).substring(1); result = ((String) result).substring(1);

Loading…
Cancel
Save