0
0
mirror of https://github.com/Doodle3D/doodle3d-connect.git synced 2024-12-24 17:43:48 +01:00

Check only online boxes for auto redirect

This commit is contained in:
peteruithoven 2014-05-07 17:17:42 +02:00
parent 2e3e058742
commit 83c694801c

View File

@ -60,7 +60,7 @@
console.log(" _wifiboxid: ",_wifiboxid);
completeHandler();
},function() {
// try connecting anyway (making sure wifiboxid retrieval isn't blocking
// try connecting anyway (making sure wifiboxid retrieval isn't blocking)
completeHandler();
});
}
@ -104,12 +104,14 @@
_actionField.attr("class","error");
break;
}
// TODO ignore connected?
_statusField.html(statusText);
_actionField.html(actionText);
// When the box is connecting we start checking connect.doodle3d.com
// for a box with the same wifiboxid
if(data.status === NetworkAPI.STATUS.CONNECTING && !_connectedChecking && _wifiboxid !== undefined) {
_connectAPI.checkLocal = false;
_connectAPI.boxAppeared = onBoxAppeared;
_connectAPI.start();
_connectedChecking = true;