From 8937f7f78121cca84ecc8e2d3d1500f0da32edfb Mon Sep 17 00:00:00 2001 From: Gwen0x4c3 <932713272@qq.com> Date: Sun, 5 May 2024 02:46:13 +0800 Subject: [PATCH] Fix the bug of getting port 0 --- .../com/github/tobato/fastdfs/domain/proto/OtherConstants.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/github/tobato/fastdfs/domain/proto/OtherConstants.java b/src/main/java/com/github/tobato/fastdfs/domain/proto/OtherConstants.java index b70d2ad..2d004f8 100644 --- a/src/main/java/com/github/tobato/fastdfs/domain/proto/OtherConstants.java +++ b/src/main/java/com/github/tobato/fastdfs/domain/proto/OtherConstants.java @@ -20,7 +20,7 @@ public final class OtherConstants { public static final int FDFS_PROTO_CMD_SIZE = 1; public static final int FDFS_PROTO_CONNECTION_LEN = 4; public static final int FDFS_GROUP_NAME_MAX_LEN = 16; - public static final int FDFS_IPADDR_SIZE = 16; + public static final int FDFS_IPADDR_SIZE = 46; // Original size is 16, which caused the problem of getting a wrong port "0". public static final int FDFS_DOMAIN_NAME_MAX_SIZE = 128; public static final int FDFS_VERSION_SIZE = 6; public static final int FDFS_STORAGE_ID_MAX_SIZE = 16;