diff --git a/src/GameOptions/ui/ConnectionBauble.tsx b/src/GameOptions/ui/ConnectionBauble.tsx index a7e6cd4f6..4e2a94c85 100644 --- a/src/GameOptions/ui/ConnectionBauble.tsx +++ b/src/GameOptions/ui/ConnectionBauble.tsx @@ -16,7 +16,7 @@ export class ConnectionBauble extends React.Component { constructor(props: baubleProps) { super(props); this.state = { - connection: false, + connection: props.callback(), callback: props.callback }; } diff --git a/src/RemoteFileAPI/RemoteFileAPI.ts b/src/RemoteFileAPI/RemoteFileAPI.ts index ceda66007..10934f18b 100644 --- a/src/RemoteFileAPI/RemoteFileAPI.ts +++ b/src/RemoteFileAPI/RemoteFileAPI.ts @@ -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);