-
Notifications
You must be signed in to change notification settings - Fork 173
Open
Description
the default conection timeout and read timeout of HttpURLConnection is -1 which means the socket will always wait to read data and block the user thread forever if server not finish the connect,so the user thread seems to stop running.
to fix this bug may change "load" method of "RSSReader" like below:
......
private int readTimeout=30000;
private int connectTimeout=30000;
......
public RSSFeed load(String uri) throws RSSReaderException{
......
HttpURLConnection conn = (HttpURLConnection) url.openConnection();
conn.setRequestMethod("GET");
conn.setConnectTimeout(readTimeout);
conn.setReadTimeout(connectTimeout);
conn.connect();
......
}Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels