Don't call stop handler twice in storage stream listener
The second status code would be 0, so it could result in spurious S3 retries. Backported from master
This commit is contained in:
parent
ec28c5a35d
commit
950e1a5047
1 changed files with 7 additions and 7 deletions
|
@ -114,13 +114,13 @@ Zotero.Sync.Storage.StreamListener.prototype = {
|
|||
Zotero.debug(stateFlags);
|
||||
Zotero.debug(status);
|
||||
|
||||
if ((stateFlags & Components.interfaces.nsIWebProgressListener.STATE_START)
|
||||
&& (stateFlags & Components.interfaces.nsIWebProgressListener.STATE_IS_NETWORK)) {
|
||||
this._onStart(request);
|
||||
}
|
||||
else if ((stateFlags & Components.interfaces.nsIWebProgressListener.STATE_STOP)
|
||||
&& (stateFlags & Components.interfaces.nsIWebProgressListener.STATE_IS_NETWORK)) {
|
||||
this._onStop(request, status);
|
||||
if (stateFlags & Components.interfaces.nsIWebProgressListener.STATE_IS_REQUEST) {
|
||||
if (stateFlags & Components.interfaces.nsIWebProgressListener.STATE_START) {
|
||||
this._onStart(request);
|
||||
}
|
||||
else if (stateFlags & Components.interfaces.nsIWebProgressListener.STATE_STOP) {
|
||||
this._onStop(request, status);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue