diff options
Diffstat (limited to 'src/org/traccar/ServerManager.java')
-rw-r--r-- | src/org/traccar/ServerManager.java | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/src/org/traccar/ServerManager.java b/src/org/traccar/ServerManager.java index 45503b717..a8da6d57e 100644 --- a/src/org/traccar/ServerManager.java +++ b/src/org/traccar/ServerManager.java @@ -1,5 +1,5 @@ /* - * Copyright 2012 - 2017 Anton Tananaev (anton@traccar.org) + * Copyright 2012 - 2018 Anton Tananaev (anton@traccar.org) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,7 +15,6 @@ */ package org.traccar; -import org.jboss.netty.channel.ChannelException; import org.traccar.helper.Log; import java.io.File; @@ -80,14 +79,12 @@ public class ServerManager { return protocolList.get(name); } - public void start() { + public void start() throws Exception { for (TrackerServer server: serverList) { try { server.start(); - } catch (ChannelException e) { - if (e.getCause() instanceof BindException) { - Log.warning("One of the protocols is disabled due to port conflict"); - } + } catch (BindException e) { + Log.warning("One of the protocols is disabled due to port conflict"); } } } @@ -96,7 +93,6 @@ public class ServerManager { for (TrackerServer server: serverList) { server.stop(); } - GlobalChannelFactory.release(); GlobalTimer.release(); } |