Skip to content

Commit

Permalink
fix: check is android while not reach limit
Browse files Browse the repository at this point in the history
  • Loading branch information
dockfries committed Sep 23, 2022
1 parent 8cd393c commit 0bab338
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions src/controllers/player/basePlayer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -931,12 +931,15 @@ export abstract class BasePlayer {
reject(new Error("disconnect"));
break;
}
const p = await this.sendClientCheck(0x48, 0, 0, 2);
if (p) {
this._isAndroid = p.actionid !== 0x48;
resolve(this._isAndroid);
break;
}
try {
const p = await this.sendClientCheck(0x48, 0, 0, 2);
if (p) {
this._isAndroid = p.actionid !== 0x48;
resolve(this._isAndroid);
break;
}
// eslint-disable-next-line no-empty
} catch (error) {}
}
if (tryCut === 10) reject(new Error("try limit"));
});
Expand Down

0 comments on commit 0bab338

Please sign in to comment.