We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2121bc3 commit 060125fCopy full SHA for 060125f
kernel/src/services/DeviceService.ts
@@ -13,7 +13,16 @@ export class DeviceService {
13
try {
14
const port = await navigator.serial.requestPort();
15
this.port = port;
16
+
17
+ // Check if the port is open by another application (or ourselves in another tab)
18
+ if (this.port.readable && this.port.writable) {
19
+ console.log('Port is already open, skipping request');
20
+ return;
21
+ }
22
23
this.transport = new Transport(port);
24
25
26
} catch (err) {
27
console.error('Failed to get port:', err);
28
throw err;
0 commit comments