Skip to content

Commit

Permalink
Enh: 良い書き方あった
Browse files Browse the repository at this point in the history
  • Loading branch information
wappon28dev committed Apr 8, 2023
1 parent 3f5e18e commit 78b9f80
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/background/portManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,7 @@ export class PortManager {
this.portLog(`Find another assignable port from ${this.port}...`);

// エンジン指定のポート + 100番までを探索 エフェメラルポートの範囲の最大は超えないようにする
let altPortMax = this.port + 100;
if (altPortMax > 65535) altPortMax = 65535;
const altPortMax = Math.min(this.port + 100, 65535);

for (let altPort = this.port + 1; altPort <= altPortMax; altPort++) {
this.portLog(`Trying whether port ${altPort} is assignable...`);
Expand Down

0 comments on commit 78b9f80

Please sign in to comment.