Commit da0fa8ad authored by xuepeng.chang's avatar xuepeng.chang

刷新头像,设置超时时间5秒

parent 6994ffa8
......@@ -37,8 +37,7 @@ import org.apache.http.message.BasicNameValuePair;
import org.apache.http.util.EntityUtils;
import javax.net.ssl.*;
import java.io.Reader;
import java.io.UnsupportedEncodingException;
import java.io.*;
import java.nio.charset.UnsupportedCharsetException;
import java.security.SecureRandom;
import java.security.cert.CertificateException;
......@@ -47,6 +46,8 @@ import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@Slf4j
public class HttpClientUtil {
......@@ -54,7 +55,7 @@ public class HttpClientUtil {
private static PoolingHttpClientConnectionManager connectionManager = null;
private static HttpRequestRetryHandler retryHandler = null;
private static ConnectionKeepAliveStrategy keepAliveStrategy = null;
private static final int TIME_OUT = 1 * 1000; // 超时时间
private static final int TIME_OUT = 5 * 1000; // 超时时间
private static final int REQUEST_CONNECTION_TIME_OUT = 1 * 1000; // 超时时间
private static final int CONNECTION_TIME_OUT = 2 * 1000; // 超时时间
private static final int SOCKET_TIME_OUT = 5 * 1000; // 超时时间
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment