diff options
author | 2009-05-28 11:45:45 -0400 | |
---|---|---|
committer | 2009-05-28 11:45:45 -0400 | |
commit | 43cd4231dea11d2cbb0151f144e4a98c618df396 (patch) | |
tree | da2d3d82ab1664b7cd82dd5c77eb82ed7fb00322 /lib/js/urweb.js | |
parent | 6a6c98d74f0eb61b52e8adc5385698a224eeccc1 (diff) |
Use a timeout to avoid errors after unload
Diffstat (limited to 'lib/js/urweb.js')
-rw-r--r-- | lib/js/urweb.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/js/urweb.js b/lib/js/urweb.js index 2b4d2643..40b170c4 100644 --- a/lib/js/urweb.js +++ b/lib/js/urweb.js @@ -94,7 +94,7 @@ function onServerError(f) { } function servErr(s) { - runHandlers("Server", serverHandlers, s); + window.setTimeout(function () { runHandlers("Server", serverHandlers, s); }, 0); } @@ -550,7 +550,8 @@ function listener() { } else { try { - servErr("Error querying remote server for messages: " + xhr.status); + if (xhr.status != 0) + servErr("Error querying remote server for messages: " + xhr.status); } catch (e) { servErr("Error querying remote server for messages"); } } } |