Skip to content

Commit

Permalink
Fix issue that caused server connection failures (fixes #4)
Browse files Browse the repository at this point in the history
  • Loading branch information
nsalminen committed Aug 31, 2024
1 parent 81d7ca5 commit ce6cd52
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions Node/components/application.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,14 +59,15 @@ export class ApplicationController {
);
}

this.connection = UbiqTcpConnection(nconf.get('roomserver:uri'), nconf.get('roomserver:tcp'));
this.scene.addConnection(this.connection);
this.roomClient.join(nconf.get('roomGuid'));
this.connection = UbiqTcpConnection(nconf.get('roomserver:uri'), nconf.get('roomserver:tcp:port'));

// This may occur immediately if the server address is invalid or unreachable. In this case, check config.json.
this.connection.onClose.push(() => {
this.log('Connection to Ubiq server closed.', 'warning');
});

this.scene.addConnection(this.connection);
this.roomClient.join(nconf.get('roomGuid'));
}

/**
Expand Down

0 comments on commit ce6cd52

Please sign in to comment.