Attempt to fix disconnect button state desync.

This commit is contained in:
raldone01
2025-07-05 19:42:44 +02:00
parent 28ded62c1c
commit bc13c80c63

View File

@@ -304,10 +304,15 @@
async disconnectPort() {
this.stopAutoReconnect();
if (!this.currentPort) return;
if (!this.currentPort) {
this.updateUIConnectionState();
return;
};
try {
await this.currentPort.disconnect();
this.setStatus('Disconnected', 'info');
}
catch (error) {
this.setStatus(`Disconnect error: ${error.message}`, 'error');