mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-15 19:26:42 +08:00
Fix http requests to use read timeout in addition to connect timeout. Co-authored-by: Dimitar Topuzov <dtopuzov@gmail.com>
This commit is contained in:
@ -525,6 +525,7 @@ public class Async {
|
|||||||
// apply timeout
|
// apply timeout
|
||||||
if (options.timeout > 0) {
|
if (options.timeout > 0) {
|
||||||
connection.setConnectTimeout(options.timeout);
|
connection.setConnectTimeout(options.timeout);
|
||||||
|
connection.setReadTimeout(options.timeout);
|
||||||
}
|
}
|
||||||
|
|
||||||
// don't follow redirect (30x) responses; by default, HttpURLConnection follows them.
|
// don't follow redirect (30x) responses; by default, HttpURLConnection follows them.
|
||||||
|
Reference in New Issue
Block a user