From 7a1b811d180bc2191201f5cb84de71ec7cbdd3bd Mon Sep 17 00:00:00 2001 From: theli Date: Thu, 14 Jun 2007 15:58:10 +0000 Subject: [PATCH] *) bugfix for SocketException: git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@3893 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 15def9c2a..33e273792 100644 --- a/source/de/anomic/server/serverCore.java +++ b/source/de/anomic/server/serverCore.java @@ -1119,10 +1119,10 @@ public final class serverCore extends serverAbstractThread implements serverThre System.err.println("ERROR: (internal) " + e); } finally { try { + // flush data this.out.flush(); - this.in.close(); - this.out.close(); + // sleep for a while try {Thread.sleep(1000);} catch (InterruptedException e) {} // maybe this doesn't work for all SSL socket implementations @@ -1131,6 +1131,11 @@ public final class serverCore extends serverAbstractThread implements serverThre this.controlSocket.shutdownOutput(); } + // close streams + this.in.close(); + this.out.close(); + + // close everything this.controlSocket.close(); this.controlSocket = null;