Permalink
Browse files

Don't time things out after they

  • Loading branch information...
1 parent b635a75 commit 4c9242c960e38642081551cd23ec241112d8309a @ConradIrwin ConradIrwin committed Sep 19, 2011
Showing with 8 additions and 6 deletions.
  1. +8 −6 test-cors/index.html
View
@@ -20,13 +20,15 @@
.fail(function () {
li.addClass("bad");
li.text((technical ? msg : 'failed') + '');
- });
+ }),
- setTimeout(function () {
- if (!d.isResolved()) {
- li.text(technical ? "timed out" : "not tested :(");
- }
- }, 10000);
+ t = setTimeout(function () {
+ li.text(technical ? "timed out" : "not tested :(");
+ }, 10000);
+
+ d.always(function () {
+ clearTimeout(t);
+ });
}
jQuery(function () {

0 comments on commit 4c9242c

Please sign in to comment.