From 18b21eaffeee8708432dae23a4411446453c7995 Mon Sep 17 00:00:00 2001 From: orbiter Date: Fri, 6 Nov 2009 19:13:35 +0000 Subject: [PATCH] small fixes to search default values and server logging git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@6460 6c8d7289-2bf4-0310-a012-ef5d649a1542 --- htroot/yacysearch.java | 6 ++++-- source/de/anomic/server/serverCore.java | 3 ++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/htroot/yacysearch.java b/htroot/yacysearch.java index 9b2185c33..5d3f2a41c 100644 --- a/htroot/yacysearch.java +++ b/htroot/yacysearch.java @@ -147,7 +147,7 @@ public class yacysearch { prop.put("num-results_itemsPerPage", 10); prop.put("geoinfo", "0"); prop.put("rss_queryenc", ""); - + prop.put("meanCount", 5); return prop; } @@ -501,7 +501,9 @@ public class yacysearch { // check suggestions int meanMax = 0; if (post != null && post.containsKey("meanCount")) { - meanMax = Integer.parseInt(post.get("meanCount")); + try { + meanMax = Integer.parseInt(post.get("meanCount")); + } catch (NumberFormatException e) {} } prop.put("meanCount", meanMax); if (meanMax > 0) { diff --git a/source/de/anomic/server/serverCore.java b/source/de/anomic/server/serverCore.java index fc5a9edac..190403c3f 100644 --- a/source/de/anomic/server/serverCore.java +++ b/source/de/anomic/server/serverCore.java @@ -864,7 +864,8 @@ public final class serverCore extends AbstractBusyThread implements BusyThread { if (logerr) Log.logWarning("SERVER", "receive interrupted"); return null; } catch (final IOException e) { - if (logerr) Log.logWarning("SERVER", "receive closed by IOException: " + e.getMessage()); + String message = e.getMessage(); + if (logerr && !message.equals("Socket closed") && !message.equals("Connection reset")) Log.logWarning("SERVER", "receive closed by IOException: " + e.getMessage()); return null; } finally { try {