JAVA/Java 일반
apache http client의 타임아웃 관련(기본 값 등) - 버전마다 틀릴 수 있음
달사자!
2019. 2. 8. 13:45
apache http client의 타임아웃 관련(기본 값 등) - 버전마다 틀릴 수 있으며 아래는 4.5.3 기준
* 요약
- 0으로 셋팅하면 무한이고, 음수로 셋팅하면 OS 시스템의 기본값을 따른다.
- 리눅스 계열에서 시스템 기본값은 net.ipv4 timeout time wait쪽을 살펴보면 되는 것 같음
[참고 - 소스]
/**
* Determines the timeout in milliseconds until a connection is established.
* A timeout value of zero is interpreted as an infinite timeout.
* <p>
* A timeout value of zero is interpreted as an infinite timeout.
* A negative value is interpreted as undefined (system default).
* </p>
* <p>
* Default: {@code -1}
* </p>
*/
public int getConnectTimeout() {
return connectTimeout;
}