Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
zh99998 committed Dec 5, 2016
1 parent 73ceaaf commit bcc1450
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions app/apps.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -382,10 +382,11 @@ export class AppsService {
return
}

let connection: Connection | undefined = this.connections.get(app);
let connection = this.connections.get(app);
if (connection) {
connection.connection.close();
}
console.log(server.url);
connection = {connection: new WebSocket(server.url), address: null};
let id: Timer | null;
this.connections.set(app, connection);
Expand All @@ -395,7 +396,7 @@ export class AppsService {
let [address, port] = args.split(':');
switch (action) {
case 'LISTEN':
(<Connection>connection).address = args;
connection!.address = args;
this.ref.tick();
break;
case 'CONNECT':
Expand Down

0 comments on commit bcc1450

Please sign in to comment.