Skip to content

Commit 91029c9

Browse files
Try a reconnection on reconnect command received
1 parent 3f0cf12 commit 91029c9

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

kernel/src/services/DeviceService.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,9 +141,11 @@ export class DeviceService {
141141

142142
if (code.includes(reconnectString)) {
143143
// Reconnect the device or connect for the first time
144-
145144
console.log('Reconnect command detected, reconnecting device...');
146-
145+
await this.disconnect();
146+
await this.connect();
147+
console.log('Device reconnected');
148+
this.isDeviceConnected = true;
147149
}
148150

149151

0 commit comments

Comments
 (0)