imagecacheservice: enforce data read timeout
This commit is contained in:
parent
e2b195e5ed
commit
30af06f37f
@ -119,6 +119,7 @@ public class ImageCacheService extends IntentService {
|
|||||||
URL url = new URL(urlString);
|
URL url = new URL(urlString);
|
||||||
URLConnection urlConnection = url.openConnection();
|
URLConnection urlConnection = url.openConnection();
|
||||||
urlConnection.setConnectTimeout(250);
|
urlConnection.setConnectTimeout(250);
|
||||||
|
urlConnection.setReadTimeout(15*1000);
|
||||||
return urlConnection.getInputStream();
|
return urlConnection.getInputStream();
|
||||||
} catch (Exception ex) {
|
} catch (Exception ex) {
|
||||||
return null;
|
return null;
|
||||||
|
Loading…
Reference in New Issue
Block a user