Start RFA connection on gamestart, test connection on bauble creation immediately

This commit is contained in:
Zoë Hoekstra 2022-07-31 20:18:11 +02:00
parent 5fc67c328b
commit 2628dc1ae8
No known key found for this signature in database
GPG Key ID: F9B7B7D8130F3323
2 changed files with 4 additions and 2 deletions

@ -16,7 +16,7 @@ export class ConnectionBauble extends React.Component<baubleProps> {
constructor(props: baubleProps) {
super(props);
this.state = {
connection: false,
connection: props.callback(),
callback: props.callback
};
}

@ -5,8 +5,10 @@ import { Remote } from "./Remote";
let server: Remote;
export function newRemoteFileApiConnection() : void {
if(server == undefined)
if(server == undefined) {
server = new Remote("localhost", Settings.RemoteFileApiPort);
server.startConnection();
}
else {
server.stopConnection();
server = new Remote("localhost", Settings.RemoteFileApiPort);