ignore errors closing serial port
This commit is contained in:
13
index.html
13
index.html
@@ -765,7 +765,12 @@
|
||||
|
||||
// close port
|
||||
console.log("Closing serial port");
|
||||
await this.serialPort.close();
|
||||
try {
|
||||
await this.serialPort.close();
|
||||
} catch(e) {
|
||||
console.log("failed to close serial port, ignoring...", e);
|
||||
}
|
||||
|
||||
|
||||
},
|
||||
async flashEsp32() {
|
||||
@@ -884,7 +889,11 @@
|
||||
|
||||
// close port
|
||||
console.log("Closing serial port");
|
||||
await serialPort.close();
|
||||
try {
|
||||
await serialPort.close();
|
||||
} catch(e) {
|
||||
console.log("failed to close serial port, ignoring...", e);
|
||||
}
|
||||
|
||||
},
|
||||
async detect() {
|
||||
|
||||
@@ -135,7 +135,11 @@ class RNode {
|
||||
}
|
||||
|
||||
async close() {
|
||||
await this.serialPort.close();
|
||||
try {
|
||||
await this.serialPort.close();
|
||||
} catch(e) {
|
||||
console.log("failed to close serial port, ignoring...", e);
|
||||
}
|
||||
}
|
||||
|
||||
async write(bytes) {
|
||||
|
||||
Reference in New Issue
Block a user