@@ -836,7 +836,11 @@ class PiPedalModelImpl implements PiPedalModel {
|
||||
})
|
||||
.then((data) => {
|
||||
this.banks.set(new BankIndex().deserialize(data));
|
||||
|
||||
if (this.webSocket)
|
||||
{
|
||||
// MUST not allow reconnect until at least one complete load has finished.
|
||||
this.webSocket.canReconnect = true;
|
||||
}
|
||||
return true;
|
||||
})
|
||||
.catch((error) => {
|
||||
@@ -848,23 +852,6 @@ class PiPedalModelImpl implements PiPedalModel {
|
||||
;
|
||||
}
|
||||
|
||||
// requestPlugins(): Promise<boolean> {
|
||||
// const myRequest = new Request(this.varRequest('uiplugins.json'));
|
||||
// return fetch(myRequest)
|
||||
// .then(
|
||||
// response => response.json()
|
||||
// )
|
||||
// .then(data => {
|
||||
// let plugins = UiPlugin.deserialize_array(data);
|
||||
// this.ui_plugins.set(plugins);
|
||||
// return true;
|
||||
// })
|
||||
// .catch((error) => {
|
||||
// this.setError("Can't contact server.\n\n" + error);
|
||||
// return false;
|
||||
// });
|
||||
|
||||
// }
|
||||
requestCurrentPedalBoard(): Promise<void> {
|
||||
const myRequest = new Request(this.varRequest('current_pedalboard.json'));
|
||||
return fetch(myRequest)
|
||||
|
||||
@@ -178,6 +178,9 @@ class PiPedalSocket {
|
||||
throw new PiPedalStateError("Server connection lost.");
|
||||
}
|
||||
}
|
||||
|
||||
canReconnect: boolean = false;
|
||||
|
||||
handleClose(_event: any): any {
|
||||
if (this.retrying) {
|
||||
// treat this as a fatal error.
|
||||
@@ -189,7 +192,10 @@ class PiPedalSocket {
|
||||
return;
|
||||
|
||||
}
|
||||
this._reconnect();
|
||||
if (this.canReconnect)
|
||||
{
|
||||
this._reconnect();
|
||||
}
|
||||
}
|
||||
_reconnect() {
|
||||
this._discardReplyReservations();
|
||||
|
||||
@@ -547,7 +547,10 @@ const SettingsDialog = withStyles(styles, { withTheme: true })(
|
||||
|
||||
</div>
|
||||
</ButtonBase>
|
||||
<ButtonBase className={classes.setting} disabled={!this.state.wifiConfigSettings.valid}
|
||||
|
||||
<ButtonBase
|
||||
style={{display: "none"}}
|
||||
className={classes.setting} disabled={!this.state.wifiConfigSettings.valid}
|
||||
onClick={() => this.handleShowGovernorSettingsDialogDialog()} >
|
||||
<SelectHoverBackground selected={false} showHover={true} />
|
||||
<div style={{ width: "100%" }}>
|
||||
@@ -559,6 +562,8 @@ const SettingsDialog = withStyles(styles, { withTheme: true })(
|
||||
|
||||
</div>
|
||||
</ButtonBase>
|
||||
|
||||
|
||||
<ButtonBase className={classes.setting} disabled={!isConfigValid || disableShutdown}
|
||||
onClick={() => this.handleRestart()} >
|
||||
<SelectHoverBackground selected={false} showHover={true} />
|
||||
|
||||
Reference in New Issue
Block a user