diff options
Diffstat (limited to 'src/org/traccar/TrackerServer.java')
-rw-r--r-- | src/org/traccar/TrackerServer.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/org/traccar/TrackerServer.java b/src/org/traccar/TrackerServer.java index c3d36b04c..490106367 100644 --- a/src/org/traccar/TrackerServer.java +++ b/src/org/traccar/TrackerServer.java @@ -25,6 +25,7 @@ import io.netty.channel.socket.nio.NioDatagramChannel; import io.netty.channel.socket.nio.NioServerSocketChannel; import io.netty.util.concurrent.GlobalEventExecutor; +import java.io.IOException; import java.net.InetSocketAddress; public abstract class TrackerServer { @@ -94,7 +95,7 @@ public abstract class TrackerServer { return channelGroup; } - public void start() { + public void start() throws Exception { InetSocketAddress endpoint; if (address == null) { endpoint = new InetSocketAddress(port); @@ -102,8 +103,7 @@ public abstract class TrackerServer { endpoint = new InetSocketAddress(address, port); } - Channel channel = bootstrap.bind(endpoint).channel(); - + Channel channel = bootstrap.bind(endpoint).sync().channel(); if (channel != null) { getChannelGroup().add(channel); } |