@ -68,7 +68,6 @@ import java.util.SortedSet;
import java.util.TreeMap ;
import java.util.TreeMap ;
import java.util.TreeSet ;
import java.util.TreeSet ;
import java.util.concurrent.ConcurrentHashMap ;
import java.util.concurrent.ConcurrentHashMap ;
import java.util.concurrent.ExecutionException ;
import java.util.concurrent.LinkedBlockingQueue ;
import java.util.concurrent.LinkedBlockingQueue ;
import java.util.concurrent.Semaphore ;
import java.util.concurrent.Semaphore ;
import java.util.concurrent.atomic.AtomicInteger ;
import java.util.concurrent.atomic.AtomicInteger ;
@ -294,15 +293,12 @@ public final class Switchboard extends serverSwitch {
sb = this ;
sb = this ;
// check if port is already occupied
// check if port is already occupied
final int port = getConfigInt ( "port" , 8090 ) ;
final int port = getConfigInt ( "port" , 8090 ) ;
try {
if ( TimeoutRequest . ping ( Domains . LOCALHOST , port , 500 ) ) {
if ( TimeoutRequest . ping ( Domains . LOCALHOST , port , 500 ) ) {
throw new RuntimeException (
throw new RuntimeException (
"a server is already running on the YaCy port "
"a server is already running on the YaCy port "
+ port
+ port
+ "; possibly another YaCy process has not terminated yet. Please stop YaCy before running a new instance." ) ;
+ "; possibly another YaCy process has not terminated yet. Please stop YaCy before running a new instance." ) ;
}
}
} catch ( final ExecutionException e1 ) {
}
MemoryTracker . startSystemProfiling ( ) ;
MemoryTracker . startSystemProfiling ( ) ;