Skip to content

Commit

Permalink
fix(transport): correctly reference class instance method
Browse files Browse the repository at this point in the history
  • Loading branch information
mroz22 committed Jul 4, 2024
1 parent 6eaf898 commit 12fe5a0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/transport/src/api/usb.ts
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@ export class UsbApi extends AbstractApi {
try {
this.logger?.debug(`usb: loadSerialNumber`);

await this.abortableMethod(device.open, signal);
await this.abortableMethod(() => device.open(), signal);
// load serial number.
await this.abortableMethod(
() =>
Expand All @@ -442,7 +442,7 @@ export class UsbApi extends AbstractApi {
signal,
);
this.logger?.debug(`usb: loadSerialNumber done, serialNumber: ${device.serialNumber}`);
await this.abortableMethod(device.close, signal);
await this.abortableMethod(() => device.close(), signal);
} catch (err) {
this.logger?.error(`usb: loadSerialNumber error: ${err.message}`);
throw err;
Expand Down

0 comments on commit 12fe5a0

Please sign in to comment.