aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/ServerManager.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/traccar/ServerManager.java')
-rw-r--r--src/org/traccar/ServerManager.java11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/org/traccar/ServerManager.java b/src/org/traccar/ServerManager.java
index cd6a071db..010438a44 100644
--- a/src/org/traccar/ServerManager.java
+++ b/src/org/traccar/ServerManager.java
@@ -62,20 +62,21 @@ public class ServerManager {
for (String name : names) {
Class protocolClass = Class.forName(packageName + '.' + name);
if (BaseProtocol.class.isAssignableFrom(protocolClass)) {
- initProtocolServer((BaseProtocol) protocolClass.newInstance());
+ BaseProtocol baseProtocol = (BaseProtocol) protocolClass.newInstance();
+ initProtocolServer(baseProtocol);
}
}
}
public void start() {
- for (Object server: serverList) {
- ((TrackerServer) server).start();
+ for (TrackerServer server: serverList) {
+ server.start();
}
}
public void stop() {
- for (Object server: serverList) {
- ((TrackerServer) server).stop();
+ for (TrackerServer server: serverList) {
+ server.stop();
}
// Release resources