Auto-select web server port (for Ubuntu); --port option for PiPedalConfig

This commit is contained in:
Robin E. R. Davies
2024-11-24 12:41:30 -05:00
parent 96df3acabd
commit 8787073338
23 changed files with 261 additions and 111 deletions
+1 -1
View File
@@ -1014,7 +1014,7 @@ export class PiPedalModel //implements PiPedalModel
try {
await this.webSocket.connect();
} catch (error) {
this.setError("Failed to connect to server. (" + getErrorMessage(error));
this.setError("Failed to connect to server. " + getErrorMessage(error) );
return false;
}
+2 -2
View File
@@ -281,7 +281,7 @@ class PiPedalSocket {
ws.onerror = (evt: Event) => {
ws.onclose = null;
ws.onerror = null;
reject("Failed to connect.");
reject("Connection not accepted.");
};
ws.onopen = (event: Event) => {
ws.onerror = self.handleError.bind(self);
@@ -290,7 +290,7 @@ class PiPedalSocket {
resolve(ws);
};
} catch (e: any){
reject("Failed to connect. " + e.toString());
reject("Failed to connect: " + e.toString());
};
});
}