Skip to content

Commit

Permalink
test(e2e): fix android e2e tests
Browse files Browse the repository at this point in the history
  • Loading branch information
marekrjpolak committed Feb 6, 2025
1 parent fc4e4c4 commit 97582c7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/connect/src/device/DeviceList.ts
Original file line number Diff line number Diff line change
Expand Up @@ -380,8 +380,8 @@ export class DeviceList extends TypedEmitter<DeviceListEvents> implements IDevic
this.emit(TRANSPORT.START, getTransportInfo(transport));
}
}
if (transport) {
// new transport started successfully or present transport kept, (re)plan check
if (transport && transport !== transports[0]) {
// new transport started successfully or present transport kept, and it's not the most preferred one, (re)plan check
this.scheduleUpgradeCheck(apiType, initParams);
}
} catch (error) {
Expand All @@ -406,8 +406,8 @@ export class DeviceList extends TypedEmitter<DeviceListEvents> implements IDevic
clearTimeout(this.scheduledUpgradeChecks[apiType]);
this.scheduledUpgradeChecks[apiType] = setTimeout(async () => {
const transport = this.transport[apiType];
if (!transport) return;
const transports = this.transports.filter(t => t.apiType === apiType);
if (!transport || transport === transports[0]) return;
for (const t of transports) {
if (t === transport) break;
if (await t.ping()) {
Expand Down

0 comments on commit 97582c7

Please sign in to comment.