Skip to content
Permalink
Browse files

Trace a message on incomplete proper server finish when killing process

  • Loading branch information...
luccioman committed Nov 15, 2018
1 parent 43d86be commit 595e144797aac6c630450fea68ae5de6e23cf821
Showing with 4 additions and 1 deletion.
  1. +4 −1 source/net/yacy/yacy.java
@@ -915,7 +915,10 @@ public void run() {

/* Main thread will release the shutdownSemaphore once completely terminated.
* We do not wait indefinitely as the application is supposed here to quickly terminate */
this.shutdownSemaphore.tryAcquire(30, TimeUnit.SECONDS);
final int maxWaitTime = 30;
if(!this.shutdownSemaphore.tryAcquire(maxWaitTime, TimeUnit.SECONDS)) {
System.out.println("Shutting down JVM. Main thread did not completely finish within " + maxWaitTime + " seconds.");
}
}
} catch (final Exception e) {
ConcurrentLog.severe("SHUTDOWN","Unexpected error. " + e.getClass().getName(),e);

0 comments on commit 595e144

Please sign in to comment.
You can’t perform that action at this time.