From 9a0ec6c549cf3ee12738f2038be67672da60a072 Mon Sep 17 00:00:00 2001 From: Karsten Kraus Date: Tue, 21 Nov 2017 18:05:05 +0100 Subject: [PATCH] bugfix: do not set timeout to 0 when none was configured --- .../jenkins/plugins/gitlab_branch_source/api/GitLabAPI.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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);