mirror of
https://gitlab.com/mangadex-pub/mangadex_at_home.git
synced 2024-01-19 02:48:37 +00:00
Add null check for safety
This commit is contained in:
parent
564f92190c
commit
46e5cf23f8
|
@ -119,7 +119,7 @@ public class MangaDexClient {
|
||||||
}
|
}
|
||||||
gracefulCounter++;
|
gracefulCounter++;
|
||||||
} else if (gracefulCounter > 0) {
|
} else if (gracefulCounter > 0) {
|
||||||
if (!isHandled.get() || gracefulCounter == 4) {
|
if (!isHandled.get() || gracefulCounter == 4 || engine == null) {
|
||||||
if (LOGGER.isInfoEnabled()) {
|
if (LOGGER.isInfoEnabled()) {
|
||||||
if (!isHandled.get()) {
|
if (!isHandled.get()) {
|
||||||
LOGGER.info("No requests received, shutting down");
|
LOGGER.info("No requests received, shutting down");
|
||||||
|
@ -128,7 +128,9 @@ public class MangaDexClient {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
stopServer();
|
if (engine != null) {
|
||||||
|
stopServer();
|
||||||
|
}
|
||||||
if (gracefulAction != null) {
|
if (gracefulAction != null) {
|
||||||
gracefulAction.run();
|
gracefulAction.run();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue