mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 560184 - Proxy authentication: Initial Weave connection attempt doesn't time out [r=mconnor]
Delay the abort timer from the constructor in addition to onStartRequest and onDataAvailable in-case the callbacks never get called. --HG-- extra : rebase_source : 1243f3baa468b13f8da28175b10aa99b2341e53a
This commit is contained in:
parent
2d05ad5684
commit
b8f15b4d9c
@ -301,6 +301,7 @@ function ChannelListener(onComplete, onProgress, logger) {
|
||||
this._onComplete = onComplete;
|
||||
this._onProgress = onProgress;
|
||||
this._log = logger;
|
||||
this.delayAbort();
|
||||
}
|
||||
ChannelListener.prototype = {
|
||||
// Wait 5 minutes before killing a request
|
||||
@ -317,9 +318,7 @@ ChannelListener.prototype = {
|
||||
|
||||
this._log.trace(channel.requestMethod + " " + channel.URI.spec);
|
||||
this._data = '';
|
||||
|
||||
// Create an abort timer to kill dangling requests
|
||||
Utils.delay(this.abortRequest, this.ABORT_TIMEOUT, this, "abortTimer");
|
||||
this.delayAbort();
|
||||
},
|
||||
|
||||
onStopRequest: function Channel_onStopRequest(channel, context, status) {
|
||||
@ -343,8 +342,13 @@ ChannelListener.prototype = {
|
||||
|
||||
this._data += siStream.read(count);
|
||||
this._onProgress();
|
||||
this.delayAbort();
|
||||
},
|
||||
|
||||
// Update the abort timer to wait an extra timeout
|
||||
/**
|
||||
* Create or push back the abort timer that kills this request
|
||||
*/
|
||||
delayAbort: function delayAbort() {
|
||||
Utils.delay(this.abortRequest, this.ABORT_TIMEOUT, this, "abortTimer");
|
||||
},
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user