Skip to content

Commit 77ccc8c

Browse files
fixed an issue with global timeout when using synchronous calls #16
1 parent 69c83ad commit 77ccc8c

File tree

3 files changed

+11
-5
lines changed

3 files changed

+11
-5
lines changed

AjaxPro/Utilities/Constant.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
/*
2727
* MS 06-03-10 changed assembly version to correct version from assembly info
2828
* MS 06-04-04 fixed if external version is using different assembly name
29+
* MS 23-05-10 fixed an issue with global timeout when using synchronous calls
2930
*
3031
*
3132
*/
@@ -52,6 +53,6 @@ public sealed class Constant
5253
/// <summary>
5354
/// The assembly version.
5455
/// </summary>
55-
public const string AssemblyVersion = "23.5.5.1";
56+
public const string AssemblyVersion = "23.5.10.1";
5657
}
5758
}

AjaxPro/core.js

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,9 @@ AjaxPro.Request.prototype = {
299299
}
300300
if (this.isRunning) {
301301
this.isRunning = false;
302-
this.onLoading(false);
302+
if (this.onLoading !== null) {
303+
this.onLoading(false);
304+
}
303305
}
304306
},
305307
dispose: function () {
@@ -524,7 +526,7 @@ AjaxPro.RequestQueue.prototype = {
524526
}
525527
};
526528

527-
AjaxPro.queue = new AjaxPro.RequestQueue(2); // 2 http connections
529+
AjaxPro.queue = new AjaxPro.RequestQueue(2); // max 2 http connections
528530

529531
AjaxPro.AjaxClass = function (url) {
530532
this.url = url;
@@ -542,7 +544,10 @@ AjaxPro.AjaxClass.prototype = {
542544
}
543545
}
544546
var r = new AjaxPro.Request();
547+
// r.onLoading = AjaxPro.onLoading;
545548
r.url = this.url;
546-
return r.invoke(method, args);
549+
var res = r.invoke(method, args);
550+
r.abort();
551+
return res;
547552
}
548553
};

0 commit comments

Comments
 (0)