Extra debugging for file sync hangs on slow connections
This commit is contained in:
parent
8c6a9bfbf0
commit
46cce5a2bd
|
@ -49,12 +49,12 @@ Zotero.Sync.Storage.StreamListener.prototype = {
|
|||
if (progress > progressMax) {
|
||||
progress = progressMax;
|
||||
}
|
||||
//Zotero.debug("onProgress with " + progress + "/" + progressMax);
|
||||
Zotero.debug("onProgress with " + progress + "/" + progressMax);
|
||||
this._onProgress(request, progress, progressMax);
|
||||
},
|
||||
|
||||
onStatus: function (request, context, status, statusArg) {
|
||||
//Zotero.debug('onStatus');
|
||||
Zotero.debug('onStatus with ' + status);
|
||||
},
|
||||
|
||||
// nsIRequestObserver
|
||||
|
@ -67,7 +67,7 @@ Zotero.Sync.Storage.StreamListener.prototype = {
|
|||
},
|
||||
|
||||
onStopRequest: function (request, context, status) {
|
||||
Zotero.debug('onStopRequest');
|
||||
Zotero.debug('onStopRequest with ' + status);
|
||||
|
||||
switch (status) {
|
||||
case 0:
|
||||
|
@ -84,7 +84,7 @@ Zotero.Sync.Storage.StreamListener.prototype = {
|
|||
// nsIWebProgressListener
|
||||
onProgressChange: function (wp, request, curSelfProgress,
|
||||
maxSelfProgress, curTotalProgress, maxTotalProgress) {
|
||||
//Zotero.debug("onProgressChange with " + curTotalProgress + "/" + maxTotalProgress);
|
||||
Zotero.debug("onProgressChange with " + curTotalProgress + "/" + maxTotalProgress);
|
||||
|
||||
// onProgress gets called too, so this isn't necessary
|
||||
//this._onProgress(request, curTotalProgress, maxTotalProgress);
|
||||
|
@ -108,8 +108,12 @@ Zotero.Sync.Storage.StreamListener.prototype = {
|
|||
onStatusChange: function (progress, request, status, message) {
|
||||
Zotero.debug("onStatusChange with '" + message + "'");
|
||||
},
|
||||
onLocationChange: function () {},
|
||||
onSecurityChange: function () {},
|
||||
onLocationChange: function () {
|
||||
Zotero.debug('onLocationChange');
|
||||
},
|
||||
onSecurityChange: function () {
|
||||
Zotero.debug('onSecurityChange');
|
||||
},
|
||||
|
||||
// nsIStreamListener
|
||||
onDataAvailable: function (request, context, stream, sourceOffset, length) {
|
||||
|
@ -119,7 +123,9 @@ Zotero.Sync.Storage.StreamListener.prototype = {
|
|||
.createInstance(Components.interfaces.nsIScriptableInputStream);
|
||||
scriptableInputStream.init(stream);
|
||||
|
||||
this._response += scriptableInputStream.read(length);
|
||||
var data = scriptableInputStream.read(length);
|
||||
Zotero.debug(data);
|
||||
this._response += data;
|
||||
},
|
||||
|
||||
// nsIChannelEventSink
|
||||
|
|
Loading…
Reference in New Issue
Block a user