Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance
Java decentralizedintranet-searchintranet-search-enginep2pp2p-networkprivacyprivacy-protectionsearch-enginesearchenginewebweb-search-enginewebsearchwebseearch-engine
serverCore: setting timeout for new connection before SSLDetect
danielr763f9d4f5ded
diff --git a/source/de/anomic/server/serverCore.java b/source/de/anomic/server/serverCore.javaindex 13b95926b..2f1891050 100644--- a/source/de/anomic/server/serverCore.java+++ b/source/de/anomic/server/serverCore.java@@ -409,16 +409,6 @@ public final class serverCore extends serverAbstractBusyThread implements server// wait for new connectionSocket controlSocket = this.socket.accept();- // wrap this socket- if (this.sslSocketFactory != null) {- controlSocket = new serverCoreSocket(controlSocket);-- // if the current connection is SSL we need to do a handshake- if (((serverCoreSocket)controlSocket).isSSL()) {- controlSocket = negotiateSSL(controlSocket);- }- }-announceThreadBlockRelease();String cIP = clientAddress(controlSocket);@@ -441,6 +431,16 @@ public final class serverCore extends serverAbstractBusyThread implements server// setting the timeout properlyassert this.timeout >= 1000;controlSocket.setSoTimeout(this.timeout);++ // wrap this socket+ if (this.sslSocketFactory != null) {+ controlSocket = new serverCoreSocket(controlSocket);++ // if the current connection is SSL we need to do a handshake+ if (((serverCoreSocket)controlSocket).isSSL()) {+ controlSocket = negotiateSSL(controlSocket);+ }+ }// keep-alive: if set to true, the server frequently sends keep-alive packets to the client which the client must respond to// we set this to false to prevent that a missing ack from the client forces the server to close the connection// controlSocket.setKeepAlive(false);