xxl-job 将连接超时时间设为20秒

This commit is contained in:
punchhhh 2025-02-06 15:23:52 +08:00
parent 9f0b9d7d34
commit 94ef0bdc7b
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");