From 78b9f800e5c4c0ee907f924d26020886bb6ece0f Mon Sep 17 00:00:00 2001 From: wappon-28-dev Date: Sun, 9 Apr 2023 04:30:51 +0900 Subject: [PATCH] =?UTF-8?q?Enh:=20=E8=89=AF=E3=81=84=E6=9B=B8=E3=81=8D?= =?UTF-8?q?=E6=96=B9=E3=81=82=E3=81=A3=E3=81=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/background/portManager.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/background/portManager.ts b/src/background/portManager.ts index 5abc65f490..348cf75093 100644 --- a/src/background/portManager.ts +++ b/src/background/portManager.ts @@ -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...`);