Skip to content

Commit

Permalink
Disconnect delegate so that software reset does not throw
Browse files Browse the repository at this point in the history
  • Loading branch information
microbit-grace committed Aug 5, 2024
1 parent 5360180 commit b0d390d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/usb-radio-bridge.ts
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@ export class MicrobitRadioBridgeConnection
}
this.disconnectPromise = (async () => {
this.serialSessionOpen = false;
await this.delegate.disconnect();
await this.serialSession?.dispose();
this.disconnectPromise = undefined;
})();
Expand Down

0 comments on commit b0d390d

Please sign in to comment.