Merge pull request 'xxl-job 将连接超时时间设为20秒' (#107) from cgt into master

Reviewed-on: #107
This commit is contained in:
root 2025-02-06 16:11:08 +08:00
commit 3aeb20eaa1
2 changed files with 2 additions and 2 deletions

View File

@ -29,7 +29,7 @@ public class AdminBizClient implements AdminBiz {
private String addressUrl ;
private String accessToken;
private int timeout = 3;
private int timeout = 20;
@Override

View File

@ -86,7 +86,7 @@ public class XxlJobRemotingUtil {
connection.setDoInput(true);
connection.setUseCaches(false);
connection.setReadTimeout(timeout * 1000);
connection.setConnectTimeout(3 * 1000);
connection.setConnectTimeout(20 * 1000);
connection.setRequestProperty("connection", "Keep-Alive");
connection.setRequestProperty("Content-Type", "application/json;charset=UTF-8");
connection.setRequestProperty("Accept-Charset", "application/json;charset=UTF-8");