Skip to content

Commit

Permalink
fixed an issue with global timeout when using synchronous calls #16
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelschwarz committed May 10, 2023
1 parent 69c83ad commit 77ccc8c
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
3 changes: 2 additions & 1 deletion AjaxPro/Utilities/Constant.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
/*
* MS 06-03-10 changed assembly version to correct version from assembly info
* MS 06-04-04 fixed if external version is using different assembly name
* MS 23-05-10 fixed an issue with global timeout when using synchronous calls
*
*
*/
Expand All @@ -52,6 +53,6 @@ public sealed class Constant
/// <summary>
/// The assembly version.
/// </summary>
public const string AssemblyVersion = "23.5.5.1";
public const string AssemblyVersion = "23.5.10.1";
}
}
11 changes: 8 additions & 3 deletions AjaxPro/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,9 @@ AjaxPro.Request.prototype = {
}
if (this.isRunning) {
this.isRunning = false;
this.onLoading(false);
if (this.onLoading !== null) {
this.onLoading(false);
}
}
},
dispose: function () {
Expand Down Expand Up @@ -524,7 +526,7 @@ AjaxPro.RequestQueue.prototype = {
}
};

AjaxPro.queue = new AjaxPro.RequestQueue(2); // 2 http connections
AjaxPro.queue = new AjaxPro.RequestQueue(2); // max 2 http connections

AjaxPro.AjaxClass = function (url) {
this.url = url;
Expand All @@ -542,7 +544,10 @@ AjaxPro.AjaxClass.prototype = {
}
}
var r = new AjaxPro.Request();
// r.onLoading = AjaxPro.onLoading;
r.url = this.url;
return r.invoke(method, args);
var res = r.invoke(method, args);
r.abort();
return res;
}
};
Loading

0 comments on commit 77ccc8c

Please sign in to comment.