🎨 #3534 为connectionRequestTimeout设置默认值,避免开发者在虚拟线程中调用框架的httpClient时造成的无限等待

This commit is contained in:
yangmengyu2021 2025-04-07 13:04:33 +08:00 committed by GitHub
parent 3f0b8d4e2b
commit 4828a314e9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -59,7 +59,7 @@ public class DefaultApacheHttpClientBuilder implements ApacheHttpClientBuilder {
* 设置为负数是使用系统默认设置(非3000ms的默认值,而是httpClient的默认设置).
* </p>
*/
private int connectionRequestTimeout = -1;
private int connectionRequestTimeout = 3000;
/**
* 建立链接的超时时间,默认为5000ms.由于是在链接池获取链接,此设置应该并不起什么作用