Skip to content

Commit ec8ae25

Browse files
luozhang002binghaiwang
authored andcommitted
fix: repair timeout excepiton (#481)
1 parent b6dc1df commit ec8ae25

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

shims/xhr.js

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ var util = require('util');
44
var urlutil = require('url');
55
var http = require('http');
66
var https = require('https');
7-
var capability = require('stream-http/lib/capability');
87
var debug = require('debug')('urllib');
98
var ms = require('humanize-ms');
109

@@ -33,7 +32,7 @@ function makeCallback(resolve, reject) {
3332
}
3433

3534
// exports.TIMEOUT = ms('5s');
36-
exports.TIMEOUTS = [ms('60s'), ms('60s')];
35+
exports.TIMEOUTS = [ms('300s'), ms('300s')];
3736

3837
var TEXT_DATA_TYPES = [
3938
'json',
@@ -147,10 +146,6 @@ exports.requestWithCallback = function requestWithCallback(url, args, callback)
147146
options.requestTimeout = args.timeout;
148147
}
149148

150-
if (capability.abortController) {
151-
options.mode = 'disable-fetch';
152-
}
153-
154149
var sslNames = [
155150
'pfx',
156151
'key',

0 commit comments

Comments
 (0)