diff options
author | Rafael Guterres <guterresrafael@gmail.com> | 2015-11-27 03:45:22 -0200 |
---|---|---|
committer | Rafael Guterres <guterresrafael@gmail.com> | 2015-11-27 03:45:22 -0200 |
commit | ca06e8d38c0bbd5a68e63ebada8e115da252b055 (patch) | |
tree | 39c00c4ceb571cae540d4c25d38ad3d45c72b49c /src/org/traccar/Main.java | |
parent | c57bd2d472467b1b3a45aee1b97c9a0aeef5958a (diff) | |
parent | 7db2eb1ad224bf00608ebbcfe13bfa7fd519a7fc (diff) | |
download | trackermap-server-ca06e8d38c0bbd5a68e63ebada8e115da252b055.tar.gz trackermap-server-ca06e8d38c0bbd5a68e63ebada8e115da252b055.tar.bz2 trackermap-server-ca06e8d38c0bbd5a68e63ebada8e115da252b055.zip |
Merge tananaev/master
Conflicts:
src/org/traccar/web/WebServer.java
Diffstat (limited to 'src/org/traccar/Main.java')
-rw-r--r-- | src/org/traccar/Main.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/org/traccar/Main.java b/src/org/traccar/Main.java index a51fa80bf..7ff93fda6 100644 --- a/src/org/traccar/Main.java +++ b/src/org/traccar/Main.java @@ -1,5 +1,5 @@ /* - * Copyright 2012 - 2013 Anton Tananaev (anton.tananaev@gmail.com) + * Copyright 2012 - 2015 Anton Tananaev (anton.tananaev@gmail.com) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -34,11 +34,11 @@ public final class Main { Context.getWebServer().start(); } - // Shutdown server properly Runtime.getRuntime().addShutdownHook(new Thread() { @Override public void run() { Log.info("Shutting down server..."); + if (Context.getWebServer() != null) { Context.getWebServer().stop(); } |