mirror of
https://github.com/yacy/yacy_search_server.git
synced 2024-09-19 00:01:41 +02:00
Trace a message on incomplete proper server finish when killing process
This commit is contained in:
parent
43d86be37b
commit
595e144797
|
@ -915,7 +915,10 @@ class shutdownHookThread extends Thread {
|
|||
|
||||
/* 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);
|
||||
|
|
Loading…
Reference in New Issue
Block a user