Skip to content
Snippets Groups Projects
Commit 7a1dde42 authored by Shudong Zhou's avatar Shudong Zhou
Browse files

Fix singleton task initialization

parent 95542331
No related branches found
No related tags found
No related merge requests found
...@@ -1795,14 +1795,6 @@ public class Controller implements IFloodlightProviderService, ...@@ -1795,14 +1795,6 @@ public class Controller implements IFloodlightProviderService,
this.roleChanger = new RoleChanger(this); this.roleChanger = new RoleChanger(this);
initVendorMessages(); initVendorMessages();
this.systemStartTime = System.currentTimeMillis(); this.systemStartTime = System.currentTimeMillis();
ScheduledExecutorService ses = threadPool.getScheduledExecutor();
roleChangeDamper = new SingletonTask(ses, new Runnable() {
@Override
public void run() {
doSetRole();
}
});
} }
/** /**
...@@ -1844,6 +1836,15 @@ public class Controller implements IFloodlightProviderService, ...@@ -1844,6 +1836,15 @@ public class Controller implements IFloodlightProviderService,
// Add our REST API // Add our REST API
restApi.addRestletRoutable(new CoreWebRoutable()); restApi.addRestletRoutable(new CoreWebRoutable());
// Start role change task
ScheduledExecutorService ses = threadPool.getScheduledExecutor();
roleChangeDamper = new SingletonTask(ses, new Runnable() {
@Override
public void run() {
doSetRole();
}
});
} }
@Override @Override
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment