diff options
author | Ilia Motornyi <elmot@vaadin.com> | 2018-06-18 13:32:03 +0200 |
---|---|---|
committer | Teemu Suo-Anttila <tsuoanttila@users.noreply.github.com> | 2018-06-19 12:34:00 +0300 |
commit | 7bf44065a4a2765e077453094dc06cc1e3c7684a (patch) | |
tree | f2a91958e805b8be9de68e6d257d92b5e03489c2 | |
parent | a1f836801bde30b0be16c158380977b4e9f70598 (diff) | |
download | vaadin-framework-7bf44065a4a2765e077453094dc06cc1e3c7684a.tar.gz vaadin-framework-7bf44065a4a2765e077453094dc06cc1e3c7684a.zip |
Graceful servlet shutdown if no VaadinService is initialized (#10981)
Fixes #10980
-rw-r--r-- | server/src/main/java/com/vaadin/server/VaadinServlet.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/server/src/main/java/com/vaadin/server/VaadinServlet.java b/server/src/main/java/com/vaadin/server/VaadinServlet.java index 06a3325f9e..73564bc8de 100644 --- a/server/src/main/java/com/vaadin/server/VaadinServlet.java +++ b/server/src/main/java/com/vaadin/server/VaadinServlet.java @@ -1432,7 +1432,9 @@ public class VaadinServlet extends HttpServlet implements Constants { @Override public void destroy() { super.destroy(); - getService().destroy(); + if (getService() != null) { + getService().destroy(); + } } private static void persistCacheEntry(ScssCacheEntry cacheEntry) { |