File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed
src/main/java/com/microsoft/graph/http Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change 3939 */
4040public class UrlConnection implements IConnection {
4141
42+ /**
43+ * Default connection read timeout
44+ */
45+ private static final int DEFAULT_CONNECTION_READ_TIMEOUT_MS = 30_000 ;
46+ /**
47+ * Default connect timeout
48+ */
49+ private static final int DEFAULT_CONNECT_TIMEOUT_MS = 30_000 ;
4250 /**
4351 * The backing HTTP URL connection instance
4452 */
@@ -63,6 +71,8 @@ public UrlConnection(final IHttpRequest request) throws IOException {
6371 }
6472
6573 connection .setUseCaches (request .getUseCaches ());
74+ connection .setConnectTimeout (DEFAULT_CONNECT_TIMEOUT_MS );
75+ connection .setReadTimeout (DEFAULT_CONNECTION_READ_TIMEOUT_MS );
6676
6777 try {
6878 connection .setRequestMethod (request .getHttpMethod ().toString ());
You can’t perform that action at this time.
0 commit comments