From d37a5cd866e97bd2381792b4b46d3864d42b3854 Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Thu, 16 Jun 2022 09:32:01 -0400 Subject: [PATCH] Convert the chip port to a constant, move 5543 to 5540 since that seems the real constant --- .../java/src/chip/devicecontroller/ControllerParams.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/controller/java/src/chip/devicecontroller/ControllerParams.java b/src/controller/java/src/chip/devicecontroller/ControllerParams.java index 6c6193f77765c7..300c71174e2a86 100644 --- a/src/controller/java/src/chip/devicecontroller/ControllerParams.java +++ b/src/controller/java/src/chip/devicecontroller/ControllerParams.java @@ -4,9 +4,11 @@ public final class ControllerParams { private final int udpListenPort; + private static final int LEGACY_GLOBAL_CHIP_PORT = 5540; + /** Creates a {@link ControllerParams} with default values. */ public ControllerParams() { - this(5543 + 1 /* To match old behavior of CHIP_PORT + 1 */); + this(LEGACY_GLOBAL_CHIP_PORT + 1 /* To match old behavior of CHIP_PORT + 1 */); } /** @param udpListenPort the UDP listening port, or 0 to pick any available port. */