Fix race condition
This commit is contained in:
parent
aa729607c9
commit
5481241760
|
@ -38,6 +38,9 @@ class WebServer {
|
|||
openBrowser: this.webServerConfig.openBrowser
|
||||
});
|
||||
|
||||
this.listenToCommands();
|
||||
this.registerConsoleCommands();
|
||||
|
||||
this.events.on('webserver:config:change', () => {
|
||||
this.embark.config.webServerConfig = null;
|
||||
this.embark.config.loadWebServerConfigFile();
|
||||
|
@ -59,8 +62,6 @@ class WebServer {
|
|||
});
|
||||
|
||||
this.testPort(() => {
|
||||
this.listenToCommands();
|
||||
this.registerConsoleCommands();
|
||||
this.server.start((_err, message, port) => {
|
||||
this.logger.info(message);
|
||||
this.port = port;
|
||||
|
|
|
@ -42,9 +42,9 @@ class Server {
|
|||
|
||||
this.app = express();
|
||||
expressWebSocket(this.app);
|
||||
|
||||
this.app.use(main);
|
||||
|
||||
this.app.use(cors());
|
||||
this.app.use(main);
|
||||
this.app.use('/coverage', coverage);
|
||||
this.app.use(coverageStyle);
|
||||
|
||||
|
|
Loading…
Reference in New Issue