diff --git a/src/main/java/argelbargel/jenkins/plugins/gitlab_branch_source/api/GitLabAPI.java b/src/main/java/argelbargel/jenkins/plugins/gitlab_branch_source/api/GitLabAPI.java index a1f4417..46c1bb6 100644 --- a/src/main/java/argelbargel/jenkins/plugins/gitlab_branch_source/api/GitLabAPI.java +++ b/src/main/java/argelbargel/jenkins/plugins/gitlab_branch_source/api/GitLabAPI.java @@ -34,7 +34,9 @@ public static GitLabAPI connect(String url, String token, boolean ignoreCertific try { GitlabAPI delegate = GitlabAPI.connect(url, token); delegate.ignoreCertificateErrors(ignoreCertificateErrors); - delegate.setRequestTimeout(requestTimeout); + if (requestTimeout > 0) { + delegate.setRequestTimeout(requestTimeout); + } return new GitLabAPI(delegate); } catch (Exception e) { throw new GitLabAPIException(e);