File tree 1 file changed +8
-1
lines changed
java/client/src/org/openqa/selenium/remote/internal
1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -82,10 +82,17 @@ public HttpClient getHttpClient() {
82
82
}
83
83
84
84
public CloseableHttpClient createHttpClient (Credentials credentials ) {
85
- return createHttpClient (credentials , 0 , 0 );
85
+ return createHttpClient (credentials , TIMEOUT_TWO_MINUTES , TIMEOUT_THREE_HOURS );
86
86
}
87
87
88
88
public CloseableHttpClient createHttpClient (Credentials credentials , int connectionTimeout , int socketTimeout ) {
89
+ if (connectionTimeout <= 0 ) {
90
+ throw new IllegalArgumentException ("connection timeout must be > 0" );
91
+ }
92
+ if (socketTimeout <= 0 ) {
93
+ throw new IllegalArgumentException ("socket timeout must be > 0" );
94
+ }
95
+
89
96
SocketConfig socketConfig = createSocketConfig (socketTimeout );
90
97
RequestConfig requestConfig = createRequestConfig (connectionTimeout , socketTimeout );
91
98
You can’t perform that action at this time.
0 commit comments