@@ -49,8 +49,6 @@ public class ClientGlobal {
4949 public static final String PROP_KEY_CONNECTION_POOL_MAX_IDLE_TIME = "fastdfs.connection_pool.max_idle_time" ;
5050 public static final String PROP_KEY_CONNECTION_POOL_MAX_WAIT_TIME_IN_MS = "fastdfs.connection_pool.max_wait_time_in_ms" ;
5151
52- public static final String PROP_KEY_SERVER_IPV6_ENABLED = "fastdfs.server_ipv6.enabled" ;
53-
5452 public static final int DEFAULT_CONNECT_TIMEOUT = 5 ; //second
5553 public static final int DEFAULT_NETWORK_TIMEOUT = 30 ; //second
5654 public static final String DEFAULT_CHARSET = "UTF-8" ;
@@ -148,9 +146,6 @@ public static void init(String conf_filename) throws IOException, MyException {
148146 if (g_connection_pool_max_wait_time_in_ms < 0 ) {
149147 g_connection_pool_max_wait_time_in_ms = DEFAULT_CONNECTION_POOL_MAX_WAIT_TIME_IN_MS ;
150148 }
151- if (iniReader .getBoolValue ("server_ipv6.enabled" ,false )){
152- ProtoCommon .useIPv6 ();
153- }
154149 }
155150
156151 /**
@@ -192,7 +187,6 @@ public static void initByProperties(Properties props) throws IOException, MyExce
192187 String poolMaxCountPerEntry = props .getProperty (PROP_KEY_CONNECTION_POOL_MAX_COUNT_PER_ENTRY );
193188 String poolMaxIdleTime = props .getProperty (PROP_KEY_CONNECTION_POOL_MAX_IDLE_TIME );
194189 String poolMaxWaitTimeInMS = props .getProperty (PROP_KEY_CONNECTION_POOL_MAX_WAIT_TIME_IN_MS );
195- String serverIPv6Enabled = props .getProperty (PROP_KEY_SERVER_IPV6_ENABLED );
196190 if (connectTimeoutInSecondsConf != null && connectTimeoutInSecondsConf .trim ().length () != 0 ) {
197191 g_connect_timeout = Integer .parseInt (connectTimeoutInSecondsConf .trim ()) * 1000 ;
198192 }
@@ -223,11 +217,6 @@ public static void initByProperties(Properties props) throws IOException, MyExce
223217 if (poolMaxWaitTimeInMS != null && poolMaxWaitTimeInMS .trim ().length () != 0 ) {
224218 g_connection_pool_max_wait_time_in_ms = Integer .parseInt (poolMaxWaitTimeInMS );
225219 }
226- if (serverIPv6Enabled != null && serverIPv6Enabled .trim ().length () != 0 ) {
227- if (Boolean .parseBoolean (poolEnabled )){
228- ProtoCommon .useIPv6 ();
229- }
230- }
231220 }
232221
233222 /**
@@ -243,11 +232,11 @@ public static void initByTrackers(String trackerServers) throws IOException, MyE
243232 String spr2 = ":" ;
244233 String [] arr1 = trackerServers .trim ().split (spr1 );
245234 for (String addrStr : arr1 ) {
246- if (addrStr .contains ("[" )){
235+ if (addrStr .contains ("[" )) {
247236 String host = addrStr .substring (1 , addrStr .indexOf ("]" ));
248237 int port = Integer .parseInt (addrStr .substring (addrStr .lastIndexOf (":" ) + 1 ));
249238 list .add (new InetSocketAddress (InetAddress .getByName (host ), port ));
250- }else {
239+ } else {
251240 String [] arr2 = addrStr .trim ().split (spr2 );
252241 String host = arr2 [0 ].trim ();
253242 int port = Integer .parseInt (arr2 [1 ].trim ());
0 commit comments