Commit 3f3585e5 authored by Liang Ding's avatar Liang Ding

🎨 Fix #12370

parent d2c8588e
......@@ -37,7 +37,7 @@ import java.net.URI;
* </ul>
*
* @author <a href="http://88250.b3log.org">Liang Ding</a>
* @version 1.1.0.9, Jul 9, 2017
* @version 1.1.0.10, Nov 9, 2017
* @since 1.2.0
*/
public final class Starter {
......@@ -187,6 +187,16 @@ public final class Starter {
// Ignored
}
Runtime.getRuntime().addShutdownHook(new Thread(() -> {
try {
server.stop();
} catch (final Exception e) {
logger.log(Level.ERROR, "Server stop failed", e);
System.exit(-1);
}
}));
server.join();
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment