Skip to content

Commit f004d68

Browse files
committed
Add disconnect handler
1 parent e33cf89 commit f004d68

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/components/microbit-connect.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ export class MicrobitConnect {
5353
const deviceInformation = await services.deviceInformationService.readDeviceInformation();
5454
this.setDeviceInformation(deviceInformation);
5555
}
56+
device.addEventListener("gattserverdisconnected", this.connectDisconnect.bind(this));
5657
}
5758
}
5859
}

0 commit comments

Comments
 (0)