Skip to content

Commit

Permalink
Improved error handling in case server dropped client
Browse files Browse the repository at this point in the history
  • Loading branch information
jzaefferer committed Aug 29, 2010
1 parent 2fe5150 commit 892d2ab
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion js/run.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ function getTests() {
function runTests( data ) {
if (data && typeof data === "string") {
// handle session timeout, where server sends back 'Username required. ?user=USERNAME.'
if ( /^Username required/.test(data) ) {
// handle TestSwarm reset, where server sends back 'Client doesn't exist.'
if ( /^Username required|^Client doesn/.test(data) ) {
cmds.reload();
return;
}
Expand Down

0 comments on commit 892d2ab

Please sign in to comment.