File tree 1 file changed +2
-6
lines changed
arduino-core/src/cc/arduino/utils/network
1 file changed +2
-6
lines changed Original file line number Diff line number Diff line change @@ -65,19 +65,15 @@ public class HttpConnectionManager {
65
65
userAgent = PreferencesData .get ("http.user_agent" , defaultUserAgent );
66
66
int connectTimeoutFromConfig = 5000 ;
67
67
try {
68
- connectTimeoutFromConfig =
69
- Integer .parseInt (
70
- PreferencesData .get ("http.connection_timeout_ms" , "5000" ));
68
+ connectTimeoutFromConfig = PreferencesData .getInteger ("http.connection_timeout_ms" , 5000 );
71
69
} catch (NumberFormatException e ) {
72
70
System .err .println ("Error parsing http.connection_timeout_ms config: " + e .getMessage ());
73
71
}
74
72
connectTimeout = connectTimeoutFromConfig ;
75
73
// Set by default 20 max redirect to follow
76
74
int maxRedirectNumberConfig = 20 ;
77
75
try {
78
- maxRedirectNumberConfig =
79
- Integer .parseInt (
80
- PreferencesData .get ("http.max_redirect_number" , "20" ));
76
+ maxRedirectNumberConfig = PreferencesData .getInteger ("http.max_redirect_number" , 20 );
81
77
} catch (NumberFormatException e ) {
82
78
System .err .println ("Error parsing http.max_redirect_number config: " + e .getMessage ());
83
79
}
You can’t perform that action at this time.
0 commit comments