slighlty different behavior in shutdown sequence for http server threads:

- first close streams
- make pause (that one that was made in httpdFileHandler)
- close sockets

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@3890 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
orbiter 18 years ago
parent e4aa8f2a08
commit 2b937abef1

@ -1120,6 +1120,10 @@ public final class serverCore extends serverAbstractThread implements serverThre
} finally {
try {
this.out.flush();
this.in.close();
this.out.close();
try {Thread.sleep(1000);} catch (InterruptedException e) {}
// maybe this doesn't work for all SSL socket implementations
if (!(this.controlSocket instanceof SSLSocket)) {
@ -1127,13 +1131,13 @@ public final class serverCore extends serverAbstractThread implements serverThre
this.controlSocket.shutdownOutput();
}
this.in.close();
this.out.close();
// close everything
this.controlSocket.close(); this.controlSocket = null;
this.controlSocket.close();
this.controlSocket = null;
} catch (IOException e) {}
} catch (IOException e) {
e.printStackTrace();
}
}
//log.logDebug("* session " + handle + " completed. time = " + (System.currentTimeMillis() - handle));

Loading…
Cancel
Save